Tag: Linq
LINQ to SQL vs ADO.NET
Posted in: Sunday, July 11th, 2010 | .net development, .Net Technology, .net web development, .net website development, Application Development Company, asp development, asp net web application development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, hire asp.net developer, hire professional designer, hiring asp.net developers, Linq, n-tier application development, web developers, web development companies, web development company | admin
ADO.NET is the underlying data access API for .NET Framework (much like JDBC in Java). It’s been around since the first release of .NET.
LINQ to SQL is a data access framework built on ADO.NET and new language features that makes SQL Server data available natively in the object oriented style of programming. LINQ (Language-Integrated Query) and thus allowing to query data using programming language’s own syntax
Continue reading…
Creating IN Queries With Linq
Posted in: Wednesday, June 23rd, 2010 | .net development, .Net Technology, .net web development, .net website development, asp development, asp net web application development, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, b2b ecommerce website development, b2b web development, dotnetnuke skins development, dotnetnuke website development, enterprise application development, hire asp programmer, hire asp.net developer, hire professional designer, hiring asp programmer, hiring asp.net developers, hiring asp.net professionals, hiring asp.net programmers, Linq, Web Application Development, web development, web development companies, web development company | admin
Linq IN query will pull back a set of results from SQL that is within a given range. This range can be set manually, or can itself be a query. So if you have an eCommerce application and you want to know what products you have in a given user’s cart
SQL
SELECT * FROM Product WHERE ProductID IN (SELECT ProductID FROM mycart)
Linq
List<int> itemQuery = new List<int>() {1,2,3,4}; var myProducts = from p in db.Products where itemQuery.Contains(p.ProductID) select p;
Linq To Sql only constructs the query when the Enumerator is tripped