This project is read-only.

Project Description:

ALinq Dynamic is a dynamic query solution for ALinq and Linq to SQL users, which supports Entity SQL and compatible with Entity Framework but do more. 


  1. Compatible with Entity Framework but do more.
  2. Linq and ESQL can work toghter.
  3. Supports ALinq and Linq to SQL framework.
  4. Run under .net 3.5 or higher version.


var employees = db.Employees.Where(o => o.Country == "EN");
var esql = "select e from @0 as e order by e.LastName";
var q = db.CreateQuery(esql, employees);


var esql = @"select o.OrderId, o.EmployeeId, d.ProductId, p.UnitPrice 
             from Orders as o 
                  Inner Join OrderDetails as d on o.OrderId == d.OrderId
                  Inner Join Products as p on d.ProductId == p.ProductId";

var q2 = db.CreateQuery<IDataRecord>(esql);
var q3 = q2.Select(o => new { OrderId = (int)o["OrderID"], 
                              EmployeeId = (int)o["EmployeeID"], 
                              ProductId = (int)o["ProductId"] })
           .Where(o => o.OrderId > 1000)
           .Join(db.Employees, o => o.EmployeeId, e => e.EmployeeID,
                          (a, b) => new { a.EmployeeId, 
                                          b.Address })


Last edited Jul 16, 2013 at 3:29 AM by ansiboy, version 29