Introduction

Magiq offers mass updates, deletes and inserts to different Linq providers. This allows you to have a strongly typed query using linq that represents, for example, singles updates, delete or insert sql statements. Currently, Magiq supports deletes, inserts, updates and assosiation updates.

Sample
Mass updates:

products.Where( x=> x.ExpirationDate <= DateTime.Now ).Set( x=> x.State, ProductState.Expired ).Update();

Will generate the following sql statement:

UPDATE [t0] SET [t0].State = @p2 FROM Products [t0] WHERE [t0].ExpirationDate <= @p1

Last edited Jan 5, 2010 at 11:12 AM by ivos, version 1

Comments

No comments yet.