views:

54

answers:

1

Hello,

i've been wondering for few hours now how can i get the QuerySurface integrated in my project.

I am using the SubSonic 3.0 ActiveRecord T4 templates with great success,

As i have been doing query with LINQ, i need also the Update, Insert and Delete functionality which according to the documentation utilize QuerySurface. http://subsonicproject.com/docs/Linq_Deletes

So i ran to the source code navigate through the github didn't find any T4 template for QuerySurface.

Is anyone having this problem or am i missing something?

to rephrase my question, how can i Update, Insert and Delete in SubSonic 3.0 with LINQ?

Thanks.

+2  A: 

The CRUD stuff is done with ActiveRecord automatically. So if you create an object, then "Save()" it (or Update/Add) it will do the work for you. Delete is a static method on the type: Product.Delete(x=>x.ProductID==1), Product.Delete(1), etc.

The Context.tt template is the QuerySurface stuff - so you already have it.

Rob Conery
Thanks Rob, now i can sleep :) get off from work early, spend time with friends and family.
Adel