We are starting a new web based product in which we are planning to expose our business logic through WCF services. We will be using ASP.NET 4.0, C#, EF 4.0. In future we want to build iphone applications and WPF applications based on the services. I have been reading a lot about using POCO vs Self Tracking Entities (STE) and from my understand the STEs do not work well with the web scenario. Can anyone shed more light on this issue?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- 'System.Threading.ThreadAbortException' in
- Request.PathInfo issues and XSS attacks
- How to dynamically load partial view Via jquery aj
相关文章
- WCF发布Windows服务 POST方式报错 GET方式没有问题 应该怎么解决?
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
Self Tracking Entities work perfectly in a MVC Web with WCF scenario. I've been involved in 2 projects using them ( one in production, one almost ).
With POCOs you'd lose any change tracking over the wire which creates a lot of extra pain because EF now has to re-query for state information. If your using EF and WCF STE's solve a lot of problems and make your entire persistence pipeline really smooth.
Can you provide citation for this claim? "STEs do not work well with the web scenario"
For me STE is absolutely wrong concept. It is just another implementation of DataSet.
If this service is going to be consumed by any app you don't have direct control over, you should probably strongly consider divorcing anything to do with EF (or nHibernate or Linq2Sql or any other data persistence management solution) from your services and your data transfer objects. This will insulate internal changes from breaking clients. Breaking clients is typically a bad thing.
Refer to http://msdn.microsoft.com/en-us/data/jj613924.aspx, as STEs is No Longer Recommended! Microsoft recommends using any of ASP.NET Web API, WCF Data Services, or Entity Framework APIs (complex ops)