Ejemplo n.º 1
0
        public Pet Update(Pet petUpdated)
        {
            _pac.Attach(petUpdated).State = EntityState.Modified;
            _pac.Entry(petUpdated).Reference(o => o.Owner).IsModified = true;
            _pac.SaveChanges();

            return(petUpdated);
        }
Ejemplo n.º 2
0
        public Owner UpdateOwner(Owner ownerUpdated)
        {
            _pac.Attach(ownerUpdated).State = EntityState.Modified;
            _pac.Entry(ownerUpdated).Reference(o => o.Pet).IsModified = true;
            _pac.SaveChanges();

            return(ownerUpdated);
        }