Project Description
A library to build sql crud commands that is based on expressions so every part of the sql statement could be an expression like ColumnSetExpression, FilterExpression, JoinExpression, etc, is intended to be agnostic but right now is being tested only with SqlServer and MySql.

Expression Builder allows developers to create sql, or xml representations and also strongly objects from xml deserialization, also right now there methods to write the query using lambda expressions:

EntityExpression expression = new EntityExpression("Customer");

expression.Select((Customer c) => new { c.FirstName, c.LastName });
expression.Where((Customer c) => c.FirstName == "Greivin" || c.FirstName == "Joel");
//expression.Group((Customer c) => c.FirstName);// expression.Group((Customer c) => new {c.FirstName, c.LastName});
expression.Order((Customer c) => new { c.Age, c.FirstName }); //expression.Order((Customer c) => c.Age, OrderType.ASC);

or

EntityExpression<Customer> expression2 = new EntityExpression<Customer>(EntityMetadata.GetEntity("Customer"));

expression2.Select(c => new { c.FirstName, c.LastName });
expression2.Where(c => c.FirstName == "Greivin" || c.FirstName == "Joel");
//expression2.Group(c => c.FirstName);
expression2.Order(c => new { c.Age, c.FirstName });

Last edited Nov 27, 2011 at 5:22 PM by brittongr, version 2