LINQ(Language Integrated Query)
Language Integrated Query (LINQ, pronounced "link") is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.
LINQ defines a set of method names (called standard query operators, or standard sequence operators), along with translation rules from so-called query expressions to expressions using these method names, lambda expressions and anonymous types. These can, for example, be used to project and filter data in arrays, enumerable classes, XML (XLINQ), relational database, and third party data sources. Other uses, which utilize query expressions as a general framework for readably composing arbitrary computations, include the construction of event handlers or monadic parsers.
LINQ to SQL
The LINQ to SQL provider allows LINQ to be used to query SQL Server databases as well as SQL Server Compact databases. Since SQL Server data resides on a remote server, and because it already includes a querying engine, LINQ to SQL does not use the query engine of LINQ. Instead, it converts a LINQ query to a SQL query which is then sent to SQL Server for processing.However, since SQL Server stores the data as relational data and LINQ works with data encapsulated in objects, the two representations must be mapped to one another. For this reason, LINQ to SQL also defines the mapping framework. The mapping is done by defining classes that correspond to the tables in the database, and containing all or a subset of the columns in the table as data members. The correspondence, along with other relational model attributes such as primary keys, are specified using LINQ to SQL-defined attributes.
To all programmers here lets learn LINQ :)
My instructor(System Analyst) said only few know how to program LINQ.
Some Students of UP does although im just from a Province-School (Nortwestern University. www.nwu.edu.ph) I want to learn about LINQ and need ur help guys!
example of LINQ-SQL (c#):
Data Context:
var db = new MyDataContext(@"server=.\SQLEXPRESS;database=my;integrated security=SSPI");
if (!db.DatabaseExists()) db.CreateDatabase();
Select One
var only = db.Customers.SingleOrDefault(c
=> c.CustID == "CHIPS");
var first = db.Customers.FirstOrDefault(c
=> c.CustID == "CHIPS");
INSERT
var customer = new Customer() {
CustID = "CHIPS",
CompanyName = "Mr. Chips" };
db.Customers.InsertOnSubmit(customer);
db.SubmitChanges();
UPDATE
customer.ContactName = "Adam";
customer.Location = null;
db.SubmitChanges();
DELETE
db.Customers.DeleteOnSubmit(customer);
db.SubmitChanges();
>>>>>
Hope Someone can discuss us about LINQ here and provide some program :)
GoodLuck ka Source :)
CEDRICK BLAS
LAOAG CITY
"DREAM IT CODE IT"
.NET Rocks!x

Comments
Lazy!
Almost the whole text of this post is taken from the English Wikipedia article about LINQ. You could at least attribute it properly.
^ Yeah seems like it
Our current projects are built using LINQ for the data layer. Sure its a lot easier of all there is in the ADO.NET
Source code soon
I will upload source codes using LINQ for the data layer as soon as my schedule clears up.
Its not too late right? =)
johnnyraventray@gmail.com
Pages
Add new comment