Example #1
0
        public static async Task <int> UpdateAsync(ossContext context, Models.Termekdij entity)
        {
            Register.Modification(context, entity);
            await context.SaveChangesAsync();

            return(entity.Termekdijkod);
        }
Example #2
0
 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));
     }
 }
Example #3
0
 public static async Task DeleteAsync(ossContext context, Models.Termekdij entity)
 {
     context.Termekdij.Remove(entity);
     await context.SaveChangesAsync();
 }