View Single Post
  #2 (permalink)  
Old August 7th, 2014, 08:52 PM
mmorgan30 mmorgan30 is offline
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

In my opinion the entity frame work and linq to entities is one of the greatest frame works to hit the development scean in a long time. it greatly decouples data access and perstance from your application devlopement and you end up spending more time where it realy counts i.e. the presentation and bussiness tiers.

In todays data centric applications; robost and dynamic slns are the key and the entity framework offers all that is needed to write complex data access but in the language that you excell in i.e. C# or VB.

stored procedure have there place, but in my exprience with data centric sites i find them more cumbersome than helpful.

a pet peave of mine when working on an application that was stored procedure driven, is when i go write some presentation for some data that is currently no there and i end up writing code in 3 different layer to get there i.e. the presentation layer, bussiness layer, and the back in plumbing. with the entity frame you see with a quick adjustment to you linq to entities query and if you have properly set up data binding you have only changed code in one place. not only does it allow for minimal coding, but in your bussiness logic you find that if you needed a simple query to get one more peice or data that you did not forsee, well with the entity frame work its childs play to get it, with a stored procedure diven application you have write all supporting logic and store procedure to get that information.

another benni is that the entity frame work makes paging data a snap for binding to paged gridviews.

i.e.
MyDBContex.MyTable.Skip( pageNumber * rowsInpage ).Take( rowsInpage );

and no sql or stored procedure written.


to do a simple data transform on the query
MyDBContex.MyTable.Skip( pageNumber * rowsInpage ).Take( rowsInpage ).Select( r => new { Filed1 = r.Field1, Field2 = r.Field2 } )

and again no sql or stored procedure written but i have different view of the same data.


so in conclusion for data scentric site i have to put a thumbs up for entity frame work and thumbs down for stored procedure.

the book that i use as my bible for linq ( and in my opinion is the heart of entity frame work ) is Pro linq and it comes in C# or VB, it really gives you an understanding of the power of this framework.

as for getting in the front end of entity frame work i.e. code first, model first and the such any book on entity frame work 4 and up should give you the needed information to get going with setting up your data models.

for some stellar tutorial check out www.asp.net

Last edited by mmorgan30; August 7th, 2014 at 09:02 PM..