Solved

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

Posted on 2009-05-04
2
559 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:
Tony McCreath 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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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.   …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 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