I'm getting back into .NET development after a couple years and it seems that now, especially with LINQ, the way you access your data has changed and become much easier. For instance, in a ASP.NET MVC website, I can:
This looks great, but how real-world is it?
And how do I make sense of all the new technologies in this space, e.g.
does LINQ-to-Entities work like LINQ-to-SQL i.e. automatically generated classes but just with more options?
is ADO.NET with its DataTables and DataSets an old technology now that we have LINQ? Does LINQ-to-ADO.NET make sense?
where does Azure fit in where you don't really even have RDBMS anymore
Now that we have so many options, if you could choose any of these technologies for a project, which would you choose and why?
This separate layer is referred to as the Data Access Layer, DAL for short, and is typically implemented as a separate Class Library project.
The EntityClient provider is used for accessing data based on an Entity Data Model (EDM). Unlike the other . NET Framework data providers, it does not interact directly with a data source. Instead, it uses Entity SQL to communicate with the underlying data provider.
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.
Select your project in the VS Solution Explorer window and press CTRL+SHIFT+A to add a new item. Search for the ADO.NET Entity Data Model item, then click “Add” to proceed. After the ADO.NET Entity Data Model component is added, it will automatically pop up its Data Model Wizard.
Initial responses (mostly on the LINQ stuff):
To answer your final question, I've not learnt enough about NHibernate or others to say, but I'd be happy to use LINQ to SQL for basic database access, but I've started looking at LINQ to Entities for my more complex stuff rather than the others - mostly because I like the pretty pictures.
Regarding SQLite: I've successfully used dbLinq to build LINQ queries to a SQLite database. It's still in it's infancy, so expect to have to fix some stuff in the generated classes, but it worked for my needs. It'll do I'd guess 85% of all the things that LinqToSql will do. And there are plenty of unit tests in the project to tell you what they know is failing.
dbLinq supports many other databases (MySQL, PostgreSQL, Firebird). I've not used it for anything other than SQLite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With