Beispiel #1
0
        public ActionResult Update(repairDto repair)
        {
            var original = repository.GetByCode(repair.Code);
            var rep      = new Repair()
            {
                Amount       = repair.Amount,
                Code         = original.Code,
                IsActive     = original.IsActive,
                Id           = original.Id,
                Element      = elementRepository.GetById(repair.Element),
                Observations = repair.Observations,
                Status       = repair.Status
            };

            this.repository.Update(rep);
            return(Ok(rep));
        }