public IActionResult LiftDetails(Lift lift, string id)
        {
            Lift liftTemp = lift;

            liftTemp.WeeklySets = new WeeklySet[20];
            liftTemp.WeeklySets = lift.WeeklySets;
            Lift updatedLift = _updateHelper.CopyNonNullItems(lift,
                                                              _repository.GetItemAsync(id).Result);

            _repository.UpdateItemAsync(id, updatedLift);
            return(RedirectToAction(nameof(Index)));
        }
        public IActionResult Edit(LifterModel lifter, string id)
        {
            var lifterToCreate = _updateHelper.CopyNonNullItems(lifter, _repository.GetItemAsync(id).Result);
            var lifterToReturn = _repository.UpdateItemAsync(id, lifterToCreate).Result;

            return(RedirectToAction(nameof(Details), new { id = lifterToReturn.Id }));
        }
        public IActionResult UpdateLifter([FromBody] LifterModel lifter, string id)
        {
            if (lifter == null)
            {
                return(BadRequest());
            }
            var lifterToCreate = _updateHelper.CopyNonNullItems(lifter, _repository.GetItemAsync(id).Result);

            if (lifterToCreate == null)
            {
                return(BadRequest());
            }
            var returnItem = _repository.UpdateItemAsync(id, lifterToCreate).Result;

            return(CreatedAtRoute("GetLifter", new { id = lifterToCreate.Id }, lifterToCreate));
        }