I have got choice for using either Entity SQL query inside my DAL or use Stored Procedure at db level as a option.
Which one should I use. And what are the benefits/drawbacks for either approach?
I am more inclined towards Entity SQL as I don’t want my any form of db level exposure of my logic.
Based on my experience:
Entity Framework:
need to know the order of the columns and such..
Database SPs
Personally, I’d go with EF too for the reasons I’ve mentioned above (plus a few others I cant think of right now). Besides, if there’s something I can’t do or cant do fast with a linq query, I’ll just create a stored proc or just execute an SQL statement (yes you can execute SQL using the context).