Hamish McCreight said:
Fact: SQL is the lingua franca for processing SQL databases.
Fact: You write stored procedures and call them as required in code,
typically via a business layer. I will send anyone I find embedding SQL
in their code on a re-education program !
No, one calls them from a Data Access layer and not the Business layer. The
Business layer calls the the Data Access layer.
Fact: Millions of books use embedded SQL in their examples,
simply because they require working examples BUT the best books will
also strongly advise that production systems should factor our database
access code into stored procedures. But it seems that a loads of
developers continue to think that embedding SQL in code , or similar,is
how to do it.
Millions of books huh? Millions of different books about T-SQL have NOT been
written. You show where 1 millon or more different books have been written
about T-SQL.
Fact: LINQ to SQL has nowhere near the power or constructs of SQL. AND
if you bother to try it with SQL Server and use the Profiler, you will
see that all it does is generate SQL. Just use a stored procedure
instead. Why should you have to learn another data access language? It's
absurd.
Linq and Linq-2-SQL in general are about the use of objects and OOP(s),
with the underlying access language being used to access the database being
T-SQL used by Linq-2-SQL. After all, that's why they have ORM(s) Object
Relational Mapping solutions.
You're talking about production systems enterprise level then you had better
figure out how to write them.
http://www.dofactory.com/Framework/Framework.aspx.
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
What is Language Integrated Query?
LINQ is a Microsoft .NET Framework component that adds native data querying
capabilities to .NET languages.
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.
Many of the concepts that LINQ has introduced were originally tested in
Microsoft's C? research project. LINQ was released as a part of .NET
Framework 3.5 on November 19, 2007.
http://en.wikipedia.org/wiki/Language_Integrated_Query
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.
http://msdn.microsoft.com/en-us/library/bb425822.aspx