public ActionResult Put([FromBody] PersonVO person)
 {
     if (person == null)
     {
         return(BadRequest());
     }
     return(new ObjectResult(_personBusiness.Update(person)));
 }
 public IActionResult Put(int id, [FromBody] PersonVO person)
 {
     if (person == null)
     {
         return(BadRequest());
     }
     person.Id = id;
     return(new ObjectResult(_personBusiness.Update(person)));
 }
        //[Authorize("Bearer")]

        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(BadRequest());
            }
            var updatedPerson = _personBusiness.Update(person);

            if (updatedPerson == null)
            {
                return(BadRequest());
            }
            return(new OkObjectResult(updatedPerson));
        }
Esempio n. 4
0
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(BadRequest());
            }
            var updatedPerson = _personService.Update(person);

            if (updatedPerson == null)
            {
                return(NoContent());
            }
            return(new ObjectResult(updatedPerson));
        }
        public IActionResult Put([FromBody] Person person)
        {
            if (person == null)
            {
                return(BadRequest());
            }
            var updatePerson = ipersonBusiness.Update(person);

            if (updatePerson == null)
            {
                return(NoContent());
            }
            return(new ObjectResult(ipersonBusiness.Update(updatePerson)));
        }
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(BadRequest());
            }
            var response = _personBusiness.Update(person);

            if (response == null)
            {
                return(NoContent());
            }

            return(new ObjectResult(response));
        }
        public IActionResult Put(int id, [FromBody] PersonVO value)
        {
            if (value == null)
            {
                return(BadRequest());
            }
            var updatedPerson = _personBusiness.Update(value);

            if (updatedPerson == null)
            {
                return(BadRequest());
            }

            return(new ObjectResult(updatedPerson));
        }
        public IActionResult Put(int id, [FromBody] PersonVO personVO)
        {
            if (personVO == null)
            {
                // return BadRequest();
                return(NotFound());
            }
            var updatedPerson = _personBusiness.Update(personVO);

            if (updatedPerson == null)
            {
                return(NoContent());
            }
            return(new ObjectResult(updatedPerson));
        }
 public IActionResult Put([FromBody] Person person)
 {
     if (person == null) return BadRequest();
     var updatePerson = _personService.Update(person);
     if (updatePerson == null) return NoContent();
     return new ObjectResult(updatePerson));
 }
 public IActionResult Put(int id, [FromBody] Person value)
 {
     if (value == null)
     {
         return(BadRequest());
     }
     return(new ObjectResult(_personBusiness.Update(value)));
 }
Esempio n. 11
0
 public IActionResult Put([FromBody] Person person)
 {
     if (person == null)
     {
         return(BadRequest());
     }
     return(new ObjectResult(_personService.Update(person)));
 }
Esempio n. 12
0
 public IActionResult Put([FromBody] person person)
 {
     if (person == null)
     {
         return(NotFound());
     }
     return(new ObjectResult(_personBusiness.Update(person)));
 }
Esempio n. 13
0
 public IActionResult Put([FromBody] Person person) //pega o Json que vem no corpo da request e converte para um objeto person
 {
     if (person == null)
     {
         return(BadRequest());
     }
     return(Ok(_IpersonBusiness.Update(person)));
 }
 public IActionResult Update([FromBody] Person item)
 {
     if (item == null)
     {
         return(BadRequest());
     }
     return(Ok(_personBusiness.Update(item)));
 }
Esempio n. 15
0
 public IActionResult Put([FromBody] Person person)
 {
     if (person == null)
     {
         return(BadRequest());
     }
     return(Ok(_personBusiness.Update(person)));
 }
Esempio n. 16
0
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(NotFound());
            }

            return(Ok(_personBusiness.Update(person)));
        }
Esempio n. 17
0
 public IActionResult Put([FromBody] PersonVO person)
 {
     if (person != null)
     {
         return(new ObjectResult(_personBusiness.Update(person)));
     }
     else
     {
         return(NotFound());
     }
 }
Esempio n. 18
0
 public IActionResult Put([FromBody] PersonVO person)
 {
     if (person != null)
     {
         return(Ok(_personRepository.Update(person)));
     }
     else
     {
         return(BadRequest("Nullable object"));
     }
 }
Esempio n. 19
0
        public IActionResult Put([FromBody] PersonVO PersonVO)
        {
            if (PersonVO == null)
            {
                return(BadRequest());
            }
            var alteraItem = _personService.Update(PersonVO);

            if (PersonVO == null)
            {
                return(NoContent());
            }
            return(new ObjectResult(alteraItem));
        }
 public IActionResult Put(int id, [FromBody] PersonInVO model)
 {
     try
     {
         var _entity = model.CreateEntity();
         _entity.Id = id;
         _personBusiness.Update(ref _entity);
         return(Ok(_entity));
     }
     catch (Exception ex)
     {
         return(this.ReturnActionResult(ex));
     }
 }
        // PUT api/values/5
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(BadRequest());
            }

            person = _personBusiness.Update(person);
            if (person.IsNull())
            {
                return(NotFound());
            }
            return(new ObjectResult(person));
        }
        public ActionResult Put(int id, [FromBody]  Person person)
        {
            if (person == null)
            {
                return(BadRequest());
            }
            var updatePerson = _personBusiness.Update(person);

            if (updatePerson == null)
            {
                return(BadRequest());
            }
            return(new ObjectResult(updatePerson));
        }
Esempio n. 23
0
        public IActionResult Put([FromBody] Person person)
        {
            if (person == null)
            {
                return(BadRequest());
            }

            var result = _personBusiness.Update(_converter.Parse(person));

            if (result == null)
            {
                return(BadRequest());
            }

            return(Ok(result));
        }
Esempio n. 24
0
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null || person.Id <= 0)
            {
                return(BadRequest("Invalid person"));
            }

            var personEntity = _personBusiness.FindById(person.Id.Value);

            if (personEntity == null)
            {
                return(NotFound($"Person with id {person.Id.Value} not found"));
            }

            return(new ObjectResult(_personBusiness.Update(person)));
        }
Esempio n. 25
0
        public IActionResult Put(int id, [FromBody] PersonValue value,
                                 [FromServices] IPersonBusiness personService,
                                 [FromServices] IMapper mapper)
        {
            value.Id = id;
            var personDomain = mapper.Map <Person>(value);

            var personUpdated = personService.Update(personDomain);

            if (personUpdated != null)
            {
                return(Ok(mapper.Map <PersonValue>(personUpdated)));
            }
            else
            {
                return(NotFound());
            }
        }
Esempio n. 26
0
        public IActionResult Put([FromBody] Person personUpdate)
        {
            if (personUpdate == null)
            {
                return(BadRequest());
            }

            var person = _personService.Update(personUpdate);

            if (person != null)
            {
                return(new OkObjectResult(person));
            }
            else
            {
                return(NotFound());
            }
        }
Esempio n. 27
0
        public async Task <IActionResult> UpdatePerson([FromBody] Person person)
        {
            bool rs = await m_PersonBusiness.Update(person);

            return(Json(rs));
        }
Esempio n. 28
0
 public IActionResult Put([FromBody] PersonVO person)
 {
     if (person == null) return BadRequest();
     return Ok(_personBusiness.Update(person));
 }
Esempio n. 29
0
 public IActionResult Update([FromBody] Person person)
 {
     return(Ok(_personBusiness.Update(person)));
 }
 public Person Update(Person person)
 {
     return(_repository.Update(person));
 }