Project DescriptionMass update, delete and insert for Linq-to-Sql and (soon) Entity Framework.
RoadmapAn example of what you can do with Magiq-to-Sql:
Collection filtering:
var expiredProducts = store.Products.Query( x => x.ExpirationDate <= DateTime.Now );
Mass updates:
products.Where( x=> x.ExpirationDate <= DateTime.Now ).Set( x=> x.State, ProductState.Expired ).Update();
Chained mass updates:
products.Where( x=> x.ExpirationDate <= DateTime.Now ).Set( x=> x.State, ProductState.Expired )
.Set( x => x.Category.HasExpiredProducts, true)
.Update();
Mass deletes:
products.Where( x=> x.ExpirationDate <= DateTime.Now ).Delete();
Mass inserts:
expirationRecords.Insert( products.Where( x=> x.ExpirationDate <= DateTime.Now )
.Select( new ExpirationRecord { Description = x.Name + " expired" } ));
Inheritance mass inserts:
baseRecordRepository.Insert( products.Where( x=> x.ExpirationDate <= DateTime.Now )
.Select( new ExpirationRecord { Description = x.Name + " expired" } ));
Magiq-to-Entities is in research/development. Suscribe to our list for newsMagiq discussion grouphttp://groups.google.com/group/magiqA lot of blog postshttp://ivowiblo.wordpress.com/category/c/magiq/