Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need advice for large .net data access layer

Starting up a new project it is 100% new development against a very large (300 tables) legacy database. The database does not match up all that well to the business model so my initial thoughts where to use a ORM.

I got a proof of concept working with NHibernate pretty well... but got A LOT of management push back on the use of "unsupported" "open-source" tool.

Any advice on other ORM solution to use? or advice on the NHibernate argument?

Thanks much.

like image 455
Todd Avatar asked Jun 28 '09 12:06

Todd


People also ask

What should be in the Data Access Layer?

Data-Access Layer (DAL) Data-Access Layer is a layer in an application that provides easy and simplified access to data stored in persistent storage, such as an entity-relational database or any database for that matter. It is layer that exists between the Business Logic Layer (BLL) and the storage layer.

Why do we need Data Access Layer?

A data access layer (DAL) in computer software is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database. This acronym is prevalently used in Microsoft environments.

Which block of .NET framework is also called Data Access Layer?

The recommended approach, however, is to separate the data access logic from the presentation layer. This separate layer is referred to as the Data Access Layer, DAL for short, and is typically implemented as a separate Class Library project.

What is the difference between Data Access Layer and business logic layer?

The data layer manages the physical storage and retrieval of data. The business layer maintains business rules and logic. The presentation layer houses the user interface and related presentation code.


2 Answers

If your management is willing to pay for a commercial ORM then you'd be wise to consider that route.

One limitation you may have (at present) with NHibernate (unless you're willing to use Alpha code from NHibernateContrib project) is that you currently don't have the luxury of using a LINQ / IQueryable mechanism to query using the increasingly familiar LINQ syntax. You'll still have the very flexible Criteria and HQl mechanisms, it just depends if you want to start investing in doing everything 'the LINQ way' or not?

From my research so far you have quite a few options (all supporting LINQ querying):

Raw Entity Framework (there are commercial partners that are adding tooling and features on top of it too.)

Lightspeed seems like a kind of LINQ-to-[lots of DBs] with good design time support.

Telerik OpenAccess looks similar to Lightspeed.

IdeaBlade DevForce is built on top of EntityFrmework buts adds some usability features. If you're not using SQL Server then use of IdeaBlade would ALSO require purchasing an ORACLE-EF provider from a separate vendor such as DevArt or DataDirect.

LLBLGen Pro Good range of features and active development. Been around a long time.

DevArt also do good data-access tooling and vendor-specific providers for LINQ.

[UPDATE] Production-ready LINQ support is now available in NHibernate!

like image 153
rohancragg Avatar answered Oct 25 '22 11:10

rohancragg


Why don't you ask management this?

How many data access solutions have Microsoft created and killed off in the time that Hibernate/NHibernate have been around?

  • ADO
  • ADO.NET
  • Strongly typed DataSets
  • LINQ2SQL
  • Entity Framework
  • Entity Framework V2

During this time Hibernate/NHibernate have been getting more and more mature. It is not going away.

like image 31
David P Avatar answered Oct 25 '22 09:10

David P