linq sql - where does your datacontext live?
i'm controlling linq sql information opening vigilant library. library used both web (web application/web service) non-web (windows service) contexts. initially, i stored datacontext
tide httpcontext
given accessible me control sincerely little section work (one web request) avoided tellurian objects web app. obviously, doesn't work windows service.
rick strahl good essay handling datacontext
's lifetime: . unfortunately, i can't adult mind best approach. tellurian datacontext
doesn't work reasons mentions, per-thread datacontext
seems difficult potentially some-more problem it's worth, per-object instance seems strict - remove magnificence insert datacontext
used emanate dao
dao
update
delete
after - mention, there's something unpleasantly chicken-and-eggish relationship.
does anyone have personal trust suggests proceed improved another? improved yet, does anyone have fourth fifth proceed i'm seeing? where best place store control your datacontext
?
Comments
Post a Comment