|
|
LINQ for Visual Csharp
Over the past 20 years object-oriented programming languages have evolved to become the premier tools for enterprise application development. They've been augmented by frameworks, APIs, and rapid application-development tools. Yet what's been missing is a way to intimately tie object-oriented programs to relational databases (and other data that doesn't exist as objects). The object paradigm is conceptually different from the relational one and this creates significant impedance between the objects programs use and the tables where data resides. ADO.NET provides a convenient interface to relational data, but not an objectoriented one. For example, this pseudocode would be really cool:
// A class representing a table of employees
Employees e = new Employees();
// Set the row identifier to one
e.ID = 1;
// Retrieve the row where ID=1
e.Retrieve();
// Change the Name column value to Alan
e.Name = “Alan”;
// Modify the database data
e.Upate();
The pseudocode shows an object-oriented approach to data management; no query or SQL statement is visible to developers. You need to think about only what you have to do, not how to do it. This approach to combining object-oriented and relational technologies has been called the Object-Relational Mapping (ORM) model.
Although Microsoft has embedded ORM capabilities in its Dynamics CRM 3.0 application server and should soon do the same in ADO.NET 3.0, it doesn't yet provide this programming model to .NET developers. To run a simple SQL query, ADO.NET programmers have to store the SQL in a Command object, associate the Command with a Connection object and execute it on that Connection object, then use a DataReader or other object to retrieve the result set. For example, the following code is necessary to retrieve the single row accessed in the pseudocode presented earlier.
Download Link
All rights reserved. All other trademarks appearing on on this site are the property of their respective owners. We don't store any files on this server, we just index the link from the other website.
|
|
|
|