Ok, I'm asking this because I'm totally confused. I did previously use normal method of access databases from C#(I am talking about by utilizing SQLConnection, OracleConnection, SQLCommand, executequery etc.). I Quickly learned about ADO.Internet, ORM and learned NHibernate(not really a professional, however i can manage).
Lately I do not use whatever particular activities regarding NHibernate a great deal. People around me who accustomed to use NHibernate(and would be a fan) are actually moving with other techniques.
What exactly is easily the most used database access method nowadays? How do i keep an eye on this altering trend?
The most typical techniques are most likely these:
- LINQ to SQL
- Entity Framework
- ADO.Internet directly
- Other O/RMs.
All are still being used and they've different pros and cons. I believe Microsoft are presently attempting to persuade folks to make use of the Entity Framework.
There's just one way - ADO.Internet for SQL Server. More particular, the bond and Readers objects inside. Now, you might say you will find such things as Entity Framework - but interesting enough they're Over the real access layer, using both access elements named before. Even DataSets really are a greater layer (the information is go through a DataReader).
What exactly is easily the most used database access method nowadays?
I wager situation datasets. The quantity of misleading following a drag and drop principle is IMHO still most, which approach in visual studio results in Datasets.
Professionals make use of an ORM of sorts. Entity Framework is fairly pressed now by individuals who mostly don't fully realize how much of an ORM can perform it designed correctly. At this time my best choice continues to be NHibernate for a top quality layer.
For me, for rapid database integration, utilizing an ORM tool like LLBLGEN is the greatest solution. You are able to accelerate the expansion progress significantly.
So, you will find couple of technologies to gain access to database insInternet. In the beginning, this really is ADO.Internet. It's one 'true' access technology, because other (like NHibernate, LINQ2SQL, Entity Framework (they all are ORM)) uses ADO.Internet to really connect with database and execute instructions against it. Obviously, .Internet provides different ways to have interaction with database, for instance, posting a number of COM interface, but they're not natural.
Also, tools that can help you contact database is available. It's ADO.Internet extensions (like Enterprise Library Data access), and tools enables you to utilize objects (named organizations) that are natural for object-oriented runtime as .Internet, but load and save that organizations in the database. These power tools named ORM (object-relational mapper), and technology advances are simple to use and nice.
Personally, i love Linq To Sql using CodeSmith to create the organizations, more particularly I believe Plinqo has got the most easy extensibility. It enables you to definitely separate all Entity objects into separate files by having an editable version along with a produced one. This enables you to definitely extend your DAL with as numerous assistant functions that you'll require. it features a Visual Studio add-for the reason that allows you regenerate all your organizations with only a click.
I normally to database first design, and so i make my alterations in the database, visit Versus regenerate the organizations, after which I'm able to continue coding.
No matter that which you choose, I believe a key point to have an ORM is having the ability to configure it to suit your needs, there's nobody size fits all.
BTW, I do not work with CodeSmith, I simply utilize it :)
well if i must select one, i'd say entityframework this is the most generic way, linq to sql has been depricated later on, nhibernate could be more and much more later on.
however the best advise is most likely attempt to select one for the entire team! even when it's downside every one has sooner or later or some other