Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-04
2
Medium Priority
?
568 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 720 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 780 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

971 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