Contact Us
Forum Home
>
DevForce
>
DevForce 2010
New Posts
FAQ
Search
Calendar
Register
Login
SaveChangesAsync and associated entities
Post Reply
Author
Message
Share Topic
Printable Version
Delicious
Digg
Facebook
Furl
Google Boomarks
Google Buzz
MySpace
Newsvine
reddit
StumbleUpon
Translate
Twitter
Windows Live
Yahoo Bookmarks
Topic Search
Topic Options
Post Reply
Create New Topic
MVenhola
Members Profile
Send Private Message
Find Members Posts
Add to Buddy List
Newbie
Joined: 20-Sep-2010
Posts: 8
Post Options
Post Reply
Quote MVenhola
Report Post
Quote
Reply
Topic: SaveChangesAsync and associated entities
Posted: 28-Jun-2011 at 8:11am
When passing an IEnumerable to SaveChangesAsync, are the associated entities saved as well?
ie:
A Project entity has an associated list of Contacts.
em.SaveChangesAsync(Projects, callback);
Are the Contacts saved as well?
sbelini
Members Profile
Send Private Message
Find Members Posts
Add to Buddy List
IdeaBlade
Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options
Post Reply
Quote sbelini
Report Post
Quote
Reply
Posted: 28-Jun-2011 at 8:56am
Hi MVenhola,
When you are doing a 'partial' save, only the entities passed on to the save are actually saved:
If you want to also save the contacts, you will need to pass them to the SaveChanges call.
In the
DevForce Resource Center
you will find an article on saving a graph of entities.
Regards,
Silvio.
Post Reply
Forum Jump
-- Select Forum --
Community Forum
Community Forum
Community Forum now on StackOverflow
DevForce 2012
DevForce 2010
DevForce 2009
DevForce Classic
Forum Permissions
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum