Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public IHttpActionResult Delete(int id)
        {
            var result = _workoutBAL.DeleteWorkout(id);

            return(Ok(result));
        }