public DirectorVO Update(DirectorVO item)
        {
            var ent = _converter.Parse(item);

            ent = _repository.Update(ent);
            return(_converter.Parse(ent));
        }
示例#2
0
        public IActionResult Post([FromBody] DirectorVO item)
        {
            if (item == null)
            {
                return(BadRequest());
            }
            var createdItem = _business.Create(item);

            if (createdItem == null)
            {
                return(BadRequest());
            }
            return(new OkObjectResult(createdItem));
        }
示例#3
0
        public IActionResult Put([FromBody] DirectorVO item)
        {
            if (item == null)
            {
                return(BadRequest());
            }
            var updatedItem = _business.Update(item);

            if (updatedItem == null)
            {
                return(NoContent());
            }
            return(new OkObjectResult(updatedItem));
        }