DA LINQ (.NET)

Data Abstract for .NET has a LINQ1 query provider for Data Abstract services. The LINQ query provider can be found in the RemObjects.DataAbstract.dll assembly and has it's own DataAdapter subclass for LINQ operations. This Data Adapter has an option to "Create DA LINQ Table Definition Classes" which will create a new file with classes that can be used with the LinqDataAdapter.

Using the LINQ provider is very simple. Queries can be done by using the generic GetTable<>` method of the RemoteDataAdapter:


var result = from c in linqRemoteDataAdapter1.GetTable<Customers>()
             where c.Name == "ALFKI"
             select new { c.Id, c.Name, c.Phone };

var result := from x in MyLINQRemoteDataAdapter.GetTable<Customer>
              where x.CustomerId = 'ALFKI'
              select new class(x.CustomerID, x.Name, x.ContactName);


Footnotes


  1. LINQ, or Language Integrated Query, is a new language paradigm introduced by the .NET 3.5 Framework and RemObject's Oxygene, that allows you to write type-safe Query Expressions to query data as part of the primary programming language (Oxygene, C#, or other).