When I last worked in programming, we were trying to move away from DataReaders
and the traditional ADO.NET API toward Object Relational Mapping (ORM).
To do this, we generated a DataContext
of our DB via sqlmetal
. There was then a thin data layer that made the DataContext
private
, and any code needing to access the database would have to use a public
method in this thin data layer. These methods were basically stored procedures; they would perform queries on the database via LINQ to SQL.
Is this a common approach today? I mean, is everyone whose using the .NET 3.5 framework really running sqlmetal in their build process, or what? It almost seemed like a hack at the time.
Basically, I'd like to know if LINQ to SQL and sqlmetal is what to expect if I'm go to write a DAL today at a .NET 3.5 shop that doesn't employ a third-party, open-source ORM.