Example #1
0
 public virtual async Task Update(T item)
 {
     try
     {
         Context.Entry(item).State = EntityState.Modified;
         await Context.SaveChangesAsync();
     }
     catch (DbUpdateConcurrencyException)
     {
         throw new RepositoryException($"{typeof(T).Name} with Id {item.Id} does not exist");
     }
 }