public static async Task DeleteAsync(ossContext context, string sid, CsoportDto dto) { SessionBll.Check(context, sid); await CsoportDal.JogeAsync(context, JogKod.CSOPORT); await CsoportDal.Lock(context, dto.Csoportkod, dto.Modositva); await CsoportDal.CheckReferencesAsync(context, dto.Csoportkod); var entity = await CsoportDal.GetAsync(context, dto.Csoportkod); await CsoportDal.DeleteAsync(context, entity); }
public static async Task <int> UpdateAsync(ossContext context, string sid, CsoportDto dto) { SessionBll.Check(context, sid); await CsoportDal.JogeAsync(context, JogKod.CSOPORT); await CsoportDal.Lock(context, dto.Csoportkod, dto.Modositva); var entity = await CsoportDal.GetAsync(context, dto.Csoportkod); ObjectUtils.Update(dto, entity); await CsoportDal.ExistsAnotherAsync(context, entity); return(await CsoportDal.UpdateAsync(context, entity)); }