public async Task UpdateAsync(VMTaskGroup data) { var entity = await DBContext.TaskGroups.FindAsync(data.Id); data.Write(DBContext, entity); DBContext.Update(entity); await DBContext.SaveChangesAsync(); }
public async Task <string> CreateAsync(VMTaskGroup data) { var entity = new TaskGroup(); data.Write(DBContext, entity); await DBContext.TaskGroups.AddAsync(entity); await DBContext.SaveChangesAsync(); return(entity.Id); }