I've been porting code from membership to identity, and using sample code from various Microsoft projects. (I've been doing this for 2 weeks, but there is now light at the end of the tunnel.)
I sometimes see 'context.savechanges' in the code I borrow.
It does not compile.
Can I replace it by: usermanager.updateuser(theuser)?
Member
61 Points
111 Posts
difference between 'context.savechanges' and 'usermanager.updateuser' is?
Mar 04, 2018 12:22 PM|RateFor|LINK
I've been porting code from membership to identity, and using sample code from various Microsoft projects. (I've been doing this for 2 weeks, but there is now light at the end of the tunnel.)
I sometimes see 'context.savechanges' in the code I borrow.
It does not compile.
Can I replace it by: usermanager.updateuser(theuser)?
Are they the same thing?
Thanks.
All-Star
53091 Points
23659 Posts
Re: difference between 'context.savechanges' and 'usermanager.updateuser' is?
Mar 04, 2018 12:32 PM|mgebhard|LINK
Commonly context is the instance name of the DbContext.
https://msdn.microsoft.com/en-us/library/jj729737(v=vs.113).aspx
UserManager is commonly the instance name of the Identity's UserManager API. UserManager uses the DbContext to interact with the database.
https://msdn.microsoft.com/en-us/library/dn613290(v=vs.108).aspx