views:

191

answers:

7

Hi,

We are working on an ASP.NET application with SQL Server 2008 as backend and we are NOT using LINQ.

In the application all database calls will be performed using/through stored procedures. So would anyone please suggest any free and best Data Access Framework which could do these jobs.

Many Thanks,

Regards.

Bhavna.

+2  A: 

I suggest you go for NHibernate.

If you are XML-shy because of the mapping you can use Fluent NHibernate, which will allow you to do all the mapping (and configuration) in your strongly-typed code.

Sebastian P.R. Gingter
+1  A: 

Are these stored procedures handwritten? If so, the DAL's job is only to create ADO.NET commands and bind the result sets to data transfer objects and collections there of. There won't be much quality difference from the best to the worst DAL for a strictly stored procedure driven database. I'd recommend doing code generation with your own handwritten templates, you'll understand the results better and it isn't very hard. T4 templates are hot right now.

Now if you are going to loosen up and let the DAL access base tables, then you have a world of Object Relational Mapper to choose from, like NHiberate and Entity Framework, which are very different in quality and approach.

And if you are using an ORM for a stored procedures, its like buying an aircraft carrier to go recreational fishing on the weekends. The ORM part will complicate things and you won't get any benefits from using an ORM framework.

MatthewMartin
Hi, Thank you for the reply. May I know where could I get these T4 templates?Regards..
@unknown- here is a link to Hanselman's write up of the technology: http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx
MatthewMartin
A: 

you can try mygeneration, this will generate your DAL Classes and stored procedure http://www.mygenerationsoftware.com/portal/default.aspx

Muhammad Akhtar
+1  A: 

I enjoy the ActiveRecord pattern and often use SubSonic, an Open Source DAL. I have only dabbled a bit with the most recent version, 3.0, but use 2.2 all the time in the projects that I create.

Download SubSonic

Wayne Hartman
A: 

the famous answer it depends on your needs and your team's knowledge :)

  • if you have an existing database i would say just use linq or entity framework because you can easly generate mapping just by drag and drop !

  • if you don't have a database Nhibernate would be a great choise because you can generate the database while you are developing you application from your mapping files

Yassir
A: 

I have found that using xml parameters in a stored proc allows the use of a single method to call all procs. All of our procs have a single xml parameter and always return xml. This greatly simplfies the code required in the DAL.

chriseyre2000
A: 

Hi, Thank you all for your time and replies.

At present we have not planed for NHibernate or LINQ. So would you please let me know the best framework then?

Thank you, Regards...