Beispiel #1
0
        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);
        }
Beispiel #2
0
        public static async Task <T> UpdateAsync <T>(this LuciferContext context, T entity) where T : EntityBase
        {
            context.Upsert(entity);

            await context.SaveChangesAsync();

            return(entity);
        }