Gabriel S.
Gabriel S.

Reputation: 1347

Entity framework function imports parameter types are reset upon model update from database

I have a stored procedure in my database (running on SQL Server 2008 R2) that takes one of its parameters as a tinyint. On the Entity Framework (v5.0) model, using function imports for that stored procedure, the parameter is mapped by default to a Byte.

However, i've created a custom enum in that model to whom i set the type of the function import's parameter that was originally Byte. The underlying data type for that enum is Byte as well. The problem is that, whenever i update the model from the database, the parameter type is reverted back to Byte, even if there were no changes at all in the database affecting the said stored procedure.

Is this a known EF bug or am i missing something?

Upvotes: 4

Views: 629

Answers (1)

Pawel
Pawel

Reputation: 31610

Unfortunately currently Update Model from the Database overwrites all the customizations made to the model.

Upvotes: 1

Related Questions