public static async Task <T> CreateAsync <T>(this LuciferContext context, T entity) where T : EntityBase { var created = context.Attach(entity); await context.SaveChangesAsync(); return(created.Entity); }
public static async Task <T> UpdateAsync <T>(this LuciferContext context, T entity) where T : EntityBase { context.Upsert(entity); await context.SaveChangesAsync(); return(entity); }