Ejemplo n.º 1
0
        public ActionResult UpdateHouse(int id, HouseUpdateDTO model)
        {
            var modelFromRepo = _repo.GetHouseById(id);

            if (modelFromRepo == null)
            {
                return(NotFound());
            }
            _mapper.Map(model, modelFromRepo);
            _repo.UpdateHouse(modelFromRepo);
            _repo.SaveChanges();

            return(NoContent());
        }