Most of my server side experience is with nodeJS meteor or rails so i dont have a wealth of .Net knowledge yet. In rails its pretty easy to pick on ORM because ActiveRecord is the only game in town or so it seems. My approach was typically query everything you can using the ORM and if you cant pull it off then drop down to raw SQL.
However I am trying to read tutorials and lessons on querying my databases in .Net 4.5 or newer apps and I am confused on what the way of the future is. I see tutorials in the following
What is the suggested ORM for modern .net apps? It seems like i can do basic CRUD operations in all of the above. But will one be better suited for say joins across tables? Mind you I only ever plan to query against Microsoft SQL server databases for my .net solutions.
what really confused me is reading that EF replaced linq but then reading that EF also uses linq. So when i see an example to say select all columns i dont know if i am using a syntax of the past or future. Also just looking at code i cant tell if its linq or EF. I can tell if its query or lambda syntax though.
The options you mentioned are not all ORMs, in this 3 the only ORM is EF. there are other popular ORMs in .net including:
Most of them support LINQ. EntityFramework is the younger one but it's integration with VS and being available out of the box is making it the most popular ORM in .net and it replaced LINQ to Entities not LINQ itself. LINQ (Language-Integrated Query) as defined in msdn can be used with different datasources.
LINQ is a set of features that extends powerful query capabilities to the language syntax of C#. LINQ introduces standard, easily-learned patterns for querying and updating data, and the technology can be extended to support potentially any kind of data store. The .NET Framework includes LINQ provider assemblies that enable the use of LINQ with .NET Framework collections, SQL Server databases, ADO.NET Datasets, and XML documents.
There are two different syntaxes to use LINQ mostly known as Fluent syntax and Query syntax.
If your new to .net as you mentioned, I suggest using EF with fluent syntax it would be the quickest way to start querying database in .net.
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