Exemple #1
0
        public async Task <PlanModel> UpdatePlan(Guid planGuid, UpdatePlanModel model)
        {
            var entity = await _planData.UpdatePlan(planGuid, model).ConfigureAwait(false);

            var mappedModel = _mapper.Map <PlanModel>(entity);

            return(mappedModel);
        }
        public IActionResult UpdatePlan([FromBody] PlanModel plan)
        {
            try
            {
                _planData.UpdatePlan(plan);

                return(Ok());
            }
            catch (Exception ex)
            {
                _apiErrorHandler.CreateError(ex.Source, ex.StackTrace, ex.Message);
            }

            return(StatusCode(500));
        }