Posted by: msqr | July 15, 2008

Data Access layer Trade off – Performance vs Dvlp effort

Nowadays, There are multiple ways of approaching a given problem. One of them is how to write DAL, though there are lot of ORM mappers(NHibernate, IBatis) and Application blocks like EnterpriseLib DAAB are available, when it comes to passing parameters to stored procedure all of them require mundane chores via either config files or declaratively defining all the Parameters:

If your company allows you to write SQL Insert queries then congrats, but for the people who have to stick to write stored procedure for every little thing. How many times you have found yourself writing this code:

SqlParameter orderID=new SqlParameter("OrderID",101)
SqlParameter Qty=new SqlParameter("Qty",5)
SqlParameter ItemId=new SqlParameter("ItemId",55)
SqlParameter Customer=new SqlParameter("Customer",101)

After developing such applications, you would say – Thats enough. I bet, you are not alone. Even Microsoft also thinks so, Eager to play Entity Framework that puts attribute hints on top of Entity members like –

[Table("Order")]
public class Order
{
[Column("Qty")]
public int Qty

[Column(“orderID”)]
public int orderID

[Column(“ItemId”)]
public int ItemId

[column(“Customer”)]
public int Customer

}

Advertisements

Responses

  1. […] – bookmarked by 2 members originally found by tchaikov on 2008-08-10 Data Access layer Trade off – Performance vs Dvlp effort https://msqr.wordpress.com/2008/07/15/data-access-layer-trade-off-performance-vs-dvlp-effort/ – […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: