views:

1764

answers:

3

I'm about to start a new .net web project. Previsouly for my n-layer web apps i've used the "Microsoft Data Access Application Block" (sqlhelper.cs) for the data access, then an interface class to interface with the object classes. I'm aware this technique is a bit dated and was looking to use something a little more with the times.

I've looked into LINQ to SQL for data access but was restricted by lacking the many to many relationship. The entity framework was a whole differnet approach that appears to have too larger learning curve.

Would there be anything wrong with using the sqlhelper.cs class to handle my data access?

+2  A: 

Not at all. It supports the creation of multi-tier layers which separates our data access from our logic. I usually have business and data classes in separate folders and include the SqlHelper class with my Data DALC class.

I'm looking forward to the move towards LINQ and the use of generics. That's my next step and I think the the use of the SqlHelper promotes good coding practice in the meantime.

I first started using it when I "borrowed" it from the Enterprise Library which was huge. Ditto for the Entity Framework which I have yet to come to grips with in the workplace. but all in good time :-)

IrishChieftain
Thanks for the feedbackI do plan to move onto something like the Entity Framework but I'll stick to my standard n-layer project layout using the old sqlhelper.cs class for these budget crital apps
beverage
A: 

You can get simple and good example of sql helper class on http://followprogrammers.blogspot.com/

sam
A: 

The last 8 months I've been using Linq and it works great for all the little jobs. The strong typing and drag-and-drop development makes it fantasticlly easy and super quick.

Previous to that, and still when Linq doesn't seem right I use SQLHelper. It cuts out all the donkey work of ADO.NET. I don't see any problem using it.

Greg B