170 likes | 271 Views
LINQ for SQL. SQL Saturday May 2009 David Fekke. Who am I?. David Fekke davidfekke@gmail.com Software Engineer at LPS Reformed DBA/Sharepoint developer JaxFusion.org. LINQ Language Integrated Query. ORM or Object Relational Mapper. .NET 3.5 Framework. SQL vs. LiNQ. Abstraction.
E N D
LINQ for SQL • SQL Saturday May 2009 • David Fekke
Who am I? • David Fekke • davidfekke@gmail.com • Software Engineer at LPS • Reformed DBA/Sharepoint developer • JaxFusion.org
MySQL • PostgreSQL • Other RDBMS supported by Open Source
Query Objects • Query XML • Query Databases
var myQuery = from p in db.people • where p.firstname == “David” • select p
Pros and Cons • Visual Studio Generates Object code • No reason to create separate queries for each RDBMS • Auto parametrize variables • Use Stored Procedures • No hinting • careful about in memory querying • SQL Statements are auto-generated with the exception of Stored Procs