Search code examples
asp.net-mvc-3entity-framework-4

Update Model from Database not updating changed data type


I am using Entity Framework 4 with ASP.NET MVC 3.

I have a table, where one of the field called "ABC" was earlier of datatype varchar(100) I have now changed this to nvarchar(256).

Now to update this in Entity Framework, I have done the following steps.

  • Open .edmx
  • Right click and selected "Update Model from Database"
  • Refresh tab
  • Selected the table I wanted to refresh
  • Ok

However after doing these steps still in the Property window the "Max Length" shows as 100.

Can some one pls help me on this.


Solution

  • I faced this problem several times.

    You can try deleting the ABC property in the edmx and follow the steps you mentioned. It worked for me.