Updatemodel no funciona en MVC

I am using Linq to Sql database model with MVC 2.0 when I try to update my model it not updating value, I try UpdataModel but it's also not working

preguntado el 10 de marzo de 12 a las 13:03

¿Puedes mostrarnos el código que estás usando? -

check your datacontext, likely it is a exception when you doing udates. Your model would probably updated in memory but not in db. is that what's happening? -

2 Respuestas

If what you mean is updating Linq-to-SQL DataContext in .dbml Designer file, then you should just manually delete the modified tables and re-add them onto the designer surface.

Entity Framework's datacontext can be refreshed by choosing the "Update Model from database" from a context menu (but sometimes even EF requires readding items). For Linq-to-SQL this option, unfortunately, doesn't work.

respondido 10 mar '12, 15:03

If you mean to say that after dragging and dropping the new table to the dbml layout, you are not able to view the changes. You will have to build the project inorder to use the auto generated linq to sql classes. If this is not what you are looking for, can you elaborate on what kind of error you are getting ?

respondido 22 mar '12, 03:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.