Project Description
Inspired by the Fluent NHibernate project, Fluent Linq to Sql allows you to define mappings for Linq to Sql entities using a fluent interface rather than attributes or XML.

Example Mapping
public class CustomerMapping : Mapping<Customer> {
   public CustomerMapping() {
	Identity(customer => customer.Id);
	Map(customer => customer.Name);
	HasMany(customer => customer.Orders).OtherKey(order => order.CustomerId);
   }
}
 
var mappingSource = new FluentMappingSource("Mydatabase");
mappingSource.AddFromAssemblyContaining<CustomerMapping>();
 
var dataContext = new DataContext("connection-string", mappingSource);
var customers = from c in dataContext.GetTable<Customer>() select c;


Documentation
Documentation coming soon!

Build Server
TeamCity
Last Successful Build
Code Coverage
Last edited Dec 24 2008 at 5:14 PM by JeremyS, version 7

 

Want to leave feedback?
Please use Discussions or Reviews instead.

Archived page comments (1)

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Version 2009.6.1.15196