public static async Task <int> UpdateAsync(ossContext context, Models.Termekdij entity) { Register.Modification(context, entity); await context.SaveChangesAsync(); return(entity.Termekdijkod); }
public static async Task ExistsAsync(ossContext context, Models.Termekdij entity) { if (await context.Termekdij.AnyAsync(s => s.Particiokod == entity.Particiokod && s.Termekdijkt == entity.Termekdijkt)) { throw new Exception(string.Format(Messages.MarLetezoTetel, entity.Termekdijkt)); } }
public static async Task DeleteAsync(ossContext context, Models.Termekdij entity) { context.Termekdij.Remove(entity); await context.SaveChangesAsync(); }