public GymWorkOutServiceResponse Create(GymWorkOut newWorkOut) { var result = new GymWorkOutServiceResponse(); try { // This operation returns a boolean, not sure how to leverage it. _repo.Insert(newWorkOut); result.ServiceResponseCode = GymWorkOutServiceResponseCodes.CreateSuccess; result.ListOfWorkouts.Add(newWorkOut); } catch (Exception e) { result.Exception = e; result.ServiceResponseCode = GymWorkOutServiceResponseCodes.CreateFail; } return result; }
public GymWorkOutServiceResponse PostASet(GymWorkOut newSet) { return _workoutService.Create(newSet); }