public ActionResult DeleteWorkout(int id) { var isWorkoutDeleted = _workoutBAL.DeleteWorkout(id); if (isWorkoutDeleted) { var workouts = _workoutBAL.GetAllWorkouts(); _workoutViewModel = new WorkoutViewModel() { Workouts = workouts }; } return(View("ViewAll", _workoutViewModel)); }
public IHttpActionResult Delete(int id) { var result = _workoutBAL.DeleteWorkout(id); return(Ok(result)); }