Ejemplo n.º 1
0
 public async Task <int> Update(Exercise exercise)
 {
     if (exercise == null || !_mesoService.GetUserMesocycles().Select(x => x.Id).Any(y => y == exercise.MesoId))
     {
         throw new NullReferenceException("Exercise could not be found");
     }
     _context.Update(exercise);
     return(await _context.SaveChangesAsync());
 }
Ejemplo n.º 2
0
 public async Task Update(Meso meso)
 {
     _context.Update(meso);
     await _context.SaveChangesAsync();
 }