views:

83

answers:

0

Let's say that I had a SQL Server database with a table called MyValues and a column called ValueA defined as decimal(7,4) and I created an Entity Framework 4 model from that table within Visual Studio 2010. The result would be an entity called MyValue with a Decimal ValueA property having a Precision set to 7.

If I go into the database and change the datatype to become decimal(10, 4), then instruct Visual Studio to "Update Module From Database..." the property remains unchanged -- the Precision remains 7.

Is this to be expected or am I missing something? I couldn't find documentation on this, and was quite surprised the change wasn't made for me. At the very least, I was expecting a validation notification that the store's precision is different than the associated entity's property's Precision. It seems pretty presumptive of Entity Framework to think that the user updating the module is cognizant of minor schema changes like this, which makes me think I'm missing something. Or is this just the nature of the beast? If so, can anyone explain why it is the way that it is (and/or link to documentation about topics like this.)