Last post Dec 03, 2009 05:41 PM by sjnaughton
Dec 03, 2009 12:15 AM|klca|LINK
Is there a way in which you can have your DataContext updated automatically?
When I have used the "magic" of Dynamic Data combined with LINQ to SQL I have found that the normalization of my ERD doesn't necessarily works as I had expected so I have to make changes on the fly to my ERD model.
As I do this I have to face the problem of refactoring my whole project because the DataContext have to be updated manually every time I make a change (even if it is in a couple of tables). This means that the whole bunch of definitions in partial classes
for scaffolding and displaying attributes, plus showing/hidding newer/older columns is a real "aching" job
What I do is: open the DataContext, select all, erase, drag all related tables again, save and recreate the whole stuff on ad on.
Is there a simple way to do this?
Carlos Porras (El Salvador)
Dec 03, 2009 05:41 PM|sjnaughton|LINK
Hi Carlos, perhaps you should consider the Entity Framework which has this facility built in. or have a look at SQLMetal.exe which is a command line tool that can create the model for you.