Ejemplo n.º 1
0
        public IActionResult Put(string id, [FromBody] PlannerModel titleIn)
        {
            var title = _plannerService.Get(id);

            if (title == null)
            {
                return(NotFound());
            }

            _plannerService.Update(id, titleIn);

            return(NoContent());
        }
        public Result Update(Planner planner)
        {
            var result = new Result();

            try
            {
                PlannerService plannerService = new PlannerService();
                plannerService.Update(planner);
                result.IsSuccess = true;
            }
            catch (Exception exception)
            {
                result.IsSuccess     = false;
                result.ExceptionInfo = exception;
            }
            return(result);
        }