Solved

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

Posted on 2009-05-04
2
556 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now