|
-
Apr 26th, 2013, 12:41 AM
#4
Re: save model from another model
 Originally Posted by VBKNIGHT
well after spending so much time with it i finally get it to save the records yes it's true you need to have an key in your table and remove the defining query.
my question is why is my edmx file the (model class specifically) change to default? even if i edited the file and put attributes on each field using visual studio 2012.
is there a correct tool or way of editing the edmx file? should it only be updated once then manually change it if there's an need to?
If you make changes to the database then you open the model in the designer, right-click the empty space and select Update From Data Source or the like. That will re-run the original wizard and your updated schema will be imported. That said, some things will not change, e.g. if you have renamed a column then the new name will be added but the old name will remain. Persoanlly, I often just delete entities for tables that have changed to ensure that there's no rubbish left behind. In fact, you can simply delete the whole model and regenerate it from scratch. If the names are the same then all your existing will just work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|