Solved

Why we need ORM / LINQ to Entities in DOTNET world ?

Posted on 2009-05-04
2
557 Views
Last Modified: 2013-11-11
Hi,

We can pass values between the layers BAL (Business Access Layer) & DAL (Data Access Layer) from PL (Presentation Layer). It is very simple. Then can you please explain to me:

Why we need ORM / LINQ to Entities in DOTNET world ?

I am totally confused - why we are using them ? In traditional programming using DOTNET, i need not worry about these. Am i correct ?

Thanks
0
Comment
Question by:milani_lucie
2 Comments
 
LVL 13

Assisted Solution

by:kaylanreilor
kaylanreilor earned 240 total points
ID: 24301717
I think you're wrong.
Using ORM or not as nothing to do with .Net or C++ or COBOL or java or whatever.
ORM (Object Role Modeling) should be done by the architect (or a developper, a team) after having written down the list of use cases (see UML), and before designing the DB for example. ORM is not part of UML but helps to identify what will be the different entities existing in your software. ORM means "performing systems analysis at the conceptual level". Honestly, I think it helps a lot but it is a methodology to design an architecture. Thus using ORM or not has nothing to do with "traditional programming using (...)" whatever you want as a technology.
http://en.wikipedia.org/wiki/Object_role_modeling

Concerning Linq : this is part of the .Net framework 3.5. And it came with this framework and VS2008.
It is a new way to perform your query against your DB.
I think you should use it. At least because Microsoft decided that you should so just don't resist young padawam.
Seriously, I think there are many advantages but it is a wide subject. Frankly I think it is not a big issue to learn it and it is better for you and your resume.
"Microsoft LINQ defines a set of proprietary query operators that can be used to query, project and filter data in arrays, enumerable classes, XML (XLINQ), relational database, and third party data sources. While it allows any data source to be queried, it requires that the data be encapsulated as objects. So, if the data source does not natively store data as objects, the data must be mapped to the object domain. Queries written using the query operators are executed either by the LINQ query processing engine or, via an extension mechanism, handed over to LINQ providers which either implement a separate query processing engine or translate to a different format to be executed on a separate data store (such as on a database server as SQL queries (DLINQ)). The results of a query are returned as a collection of in-memory objects that can be enumerated using a standard iterator function such as C#'s foreach"
http://msdn.microsoft.com/en-us/library/bb308959.aspx
0
 
LVL 23

Accepted Solution

by:
Tiggerito earned 260 total points
ID: 24303318
I think of ORM as Object Relational Mapping

http://en.wikipedia.org/wiki/Object-relational_mapping

Especially in the context of DALs

.Net does not require you to use these things. ADO.Net can be used in the more traditional ways as well.

I personally believe that ORMs let developers concentrate more on the business logic instead of having to think about database interaction all the time.

Obviously, this all depends on the requirements.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question