SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 330 | Next

Scott Klein

"Professional LINQ"

_Employee.Entity; }
set { this._Employee.Entity = value; }
}
}
More about LINQ to SQL and database relationships is discussed in Chapter 12.
Mapping Stored Procedures
One of the many great qualities of LINQ to SQL is its support for stored procedures, which is
accomplished via the StoredProcedure attribute. That attribute is used to map a stored procedure in
the database to a client object. It has only a single property, Name, which specifies the name of the stored
procedure. Here??™s the attribute??™s general syntax:
[StoredProcedure(Name="OrdersBySalesPersonID")]
public IEnumerable OrdersBySalesPersonID([Parameter(DBType = "int")] String param1)
{
IExecuteResults results = this.ExecuteMethodCall
(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())),
param1);
}
With LINQ to SQL, you can easily map each database object to a client object, providing
developers the capability to access the stored procedures through client code in a strongly typed
manner. Through this mapping, the client method signatures bear a resemblance to the signatures of
the procedure that is defined in the database, utilizing many of the programming language features
such as IntelliSense.


Pages:
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6