Michael said:
I'm a big fan of linq but in my opinion linq to sql is a complete waste of
time. Why on earth take something that is already complex (sql) and make it
more complex and difficult to write by creating a translation layer. I see
people here struggling to write linq to sql queries. It also creates the
problem of being locked into a particular product with regards to the
database which is exactly the problem I thought a translation layer would be
designed to solve. I was assuming that this would be largely reflected in
community opinion but this doesn't seem to be the case. Am I missing
something? I'd be interested to hear from people who love it and people who
loath it. If you do loath it please reply also as generally in newsgroups on
those who disagree reply.
Well, if one went to Linq-2-SQL, then one is going to stick with SQL
Server as the database.
Really, how many companies have you seen that actually changed to
another database like Oracle or MySQL from SQL server? Most companies
will not make such a change.
You shouldn't under estimate Linq-2-SQL as it does have its place,
particularly with N-Tier architect applications.
<
http://lostintangent.com/2007/12/12/adonet-data-services-part-1-services-contd/>
<
http://www.silverclouddevelopment.com/mydocs/Chapter 2 - WCF RIA SL BUS APP start .pdf>
I myself I like ADO.Entity Framework, that allows one to use other
database vendors, other than, MS SQL Server.
If a Windows based application was to consume a service like a classic
ASP.NET Web service or one of the WCF services such as a Web, TCP/IP,
Named Pipe, or MSMQ service, then most likely Linq-2-SQL or ADO.NET
Entity Framework is going to be the technology use to access the
database on the back-end.
It's too much work to use sproc or t-sql inline with a datareader to
build objects of data, when those objects already exist on the virtual
database model with Link-2-SQL or ADO.NET Entity Framework,and objects
traveling between the client and a service in a N-Tier application.
The purpose of Linq is what?
Microsoft LINQ defines a set of query operators that can be used to
query, project and filter data in arrays, enumerable classes, XML,
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). 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.
What is Linq-to-SQL?
LINQ to SQL, a component of Visual Studio Code Name "Orcas", provides a
run-time infrastructure for managing relational data as *objects*
without losing the ability to query. It does this by translating
language-integrated queries into SQL for execution by the database, and
then translating the tabular results back into objects you define. Your
application is then free to manipulate the objects while LINQ to SQL
stays in the background tracking your changes automatically.
The above holds true for ADO.NET Entity Framework, an ORM, and
Linq-2-Object and object encapsulation,inheritance and all that comes
with an object.
What is Object-oriented-programming?
(OOP) is a programming paradigm that uses "objects" and their
interactions to design applications and computer programs.
The key concepts of OOP are the following:
Class
Object
Instance
Method
Message passing
Inheritance
Abstraction
Encapsulation
Polymorphism
Decoupling
http://en.wikipedia.org/wiki/Object-oriented_programming
One gets use to using objects and things become simple.
![Smile :) :)](/styles/default/custom/smilies/smile.gif)