I have a small application that uses Entity Framework to expose information to an oData service. I need to allow my web server to call a SQL sproc for auditing purposes.
What technology should I use to keep the app "clean"?
- Should I follow these directions for EF3.5?
- Should I use ADO.NET?
- Linq2SQL?开发者_如何学Go
- Should I upgrade to .NET 4 so I can take advantage of the better EF?
What makes the most sense from a supportability perspective?
This is subjective, but I'd go for EF4.
Well the only real difference between ADO.NET/L2SQL/EF is that EF4 allows mapping of stored procedures to complex types.
What this means is you can map the result of a stored proc directly to a POCO, and align it with your domain model.
This is not possible with ADO.NET / L2SQL, and for that reason alone i'd also recommend EF4.
i would also recommend EF4 because there are so many things in EF4 that actually works. Also there has been lot of improvements in sql generation for EF4.
精彩评论