attaching entities information contexts
in linq sql, illusory check an entity already biased information context before perplexing insert it?
a small context helps...
i have formula global.asax supporter method. normally, between requests, isn't problem. nonetheless right after signing in, removing called some-more once, second i finish adult perplexing insert member vigilant same section work where created.
private vacant checkcurrentuser()
{
(!httpcontext.current.user.identity.isauthenticated)
{
apphelper.currentmember = null;
return;
}
iuserservice userservice = new userservice();
(apphelper.currentmember != null)
userservice.attachexisting(apphelper.currentmember);
else
apphelper.currentmember = userservice.getmember(
httpcontext.current.user.identity.name,
apphelper.currentlocation);
}
Comments
Post a Comment