public static OpResult SaveAll <T>(this IEnumerable <T> docs, IDataContext context) where T : IModelBase { return(OpResult.From(context.GetDb().Upsert(docs))); }
public static OpResult Delete <T>(this T doc, IDataContext context) where T : IModelBase { return(OpResult.From(context.GetDb().Delete <T>(doc.Id))); }
public static OpResult Save <T>(this T doc, IDataContext context) where T : IModelBase { return(OpResult.From(context.GetDb().Upsert(doc))); }