public async Task <IActionResult> PutWorkoutExcerciseCategories(Guid id, WorkoutExcerciseCategories workoutExcerciseCategories) { if (id != workoutExcerciseCategories.Workout_excercise_categories_id) { return(BadRequest()); } _context.Entry(workoutExcerciseCategories).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkoutExcerciseCategoriesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <WorkoutExcerciseCategories> > PostWorkoutExcerciseCategories(WorkoutExcerciseCategories workoutExcerciseCategories) { _context.WorkoutsExcercisesCategories.Add(workoutExcerciseCategories); await _context.SaveChangesAsync(); return(CreatedAtAction("GetWorkoutExcerciseCategories", new { id = workoutExcerciseCategories.Workout_excercise_categories_id }, workoutExcerciseCategories)); }