我是 Subsonic 的新手,似乎找不到使用 LINQ 模板类进行 CRUD 操作的自然方法。我猜在 ActiveRecord 中,你可以:
Product p = new Product();
p.ProductCode = "xxx";
p.Add();
但是,使用 LINQTemplate 生成的类,我该如何做同样的事情?我只能使用下面这样的东西来插入产品对象:
db.Insert.Into<UnleashedSaaS.PRODUCT>(prod => prod.Code, prod => prod.Description).Values("Product1", "Product1 Desc").Execute();
谁能给我一些提示?我真的很感激。