entity framework - What's the best POCO status tracking strategy? (EF) -
so reading entity framework , based on agile development scenario decided go poco objects.
but i'm having problems don't know how away with.
i'm working ria services , silverlight when i'm going save object of server side have attach object objectcontext
. thing must change objectstate
added or modified.
so question what's best approach know state change to. saw in julia lerman's book uses state
attribute in poco objects , takes care managing state on client side before sending object server. state used change real entitysate once attached.
i've seen other samples insert implementation checks on key of entity (object) know whether new or not. example, if projectid
in project entity 0 (zero) know has new object.
to honest don't of approaches because in both cases developers have extra-work save object.
i'd know pros , cons of both solutions , new (better) solution i'm still not seing.
you can still have self tracking entities , poco. in visual studio if search community templates there self tracking poco template. want use. if can find template entities using ientitywithobjecttracker.
Comments
Post a Comment