开发者

Entity Framework 4 POCO Self Tracking

开发者 https://www.devze.com 2023-03-05 14:53 出处:网络
Hi I am developing a project with EF 4. I am trying to implement POCO Self Tracking do I need to implement a wcf service?

Hi I am developing a project with EF 4. I am trying to implement POCO Self Tracking do I need to implement a wcf service? I am having issues with modifying the entities as the changes are not pe开发者_C百科rsisted to the db.

Thanks in advance.


No you don't need service but if you don't use the service you should manually say to self tracking entity that it must start tracking changes by calling StartTracking

I explained purpose of self tracking entities in another answer. If you don't need detaching self tracking entities from the context you should use POCOs. Attached self tracking entity works as POCO but it looses some features - for example lazy loading because self tracking entities are not proxied.

Using self tracking entities with WCF makes sense only if you have control over the client and client is written in .NET. I also described this in another answer.

You probably don't need STEs.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号