Пример #1
0
        public Owner UpdateFullOwner(Owner theNewOwner, Owner theOldOwner)
        {
            var updatedOwner = _ctx.Update(theNewOwner).Entity;

            _ctx.SaveChanges();
            return(updatedOwner);
        }
Пример #2
0
        public PetType UpdatePetType(PetType theNewPetType, PetType theOldPetType)
        {
            var updatedType = _ctx.Update(theNewPetType).Entity;

            _ctx.SaveChanges();
            return(updatedType);
        }
Пример #3
0
        public PetColor UpdatePetColor(PetColor theNewPetColor)
        {
            var updatedColor = _ctx.Update(theNewPetColor).Entity;

            _ctx.SaveChanges();
            return(updatedColor);
        }
Пример #4
0
        public User EditUser(User alteredUser)
        {
            var finishedUser = _ctx.Update(alteredUser).Entity;

            _ctx.SaveChanges();
            return(finishedUser);
        }
Пример #5
0
        public Pet UpdateFullPet(Pet theNewPet)
        {
            _ctx.Attach(theNewPet.PetOwner);
            _ctx.Attach(theNewPet.PetType);
            var updatedPet = _ctx.Update(theNewPet).Entity;

            _ctx.SaveChanges();
            return(updatedPet);
        }