public Owner UpdateFullOwner(Owner theNewOwner, Owner theOldOwner) { var updatedOwner = _ctx.Update(theNewOwner).Entity; _ctx.SaveChanges(); return(updatedOwner); }
public PetType UpdatePetType(PetType theNewPetType, PetType theOldPetType) { var updatedType = _ctx.Update(theNewPetType).Entity; _ctx.SaveChanges(); return(updatedType); }
public PetColor UpdatePetColor(PetColor theNewPetColor) { var updatedColor = _ctx.Update(theNewPetColor).Entity; _ctx.SaveChanges(); return(updatedColor); }
public User EditUser(User alteredUser) { var finishedUser = _ctx.Update(alteredUser).Entity; _ctx.SaveChanges(); return(finishedUser); }
public Pet UpdateFullPet(Pet theNewPet) { _ctx.Attach(theNewPet.PetOwner); _ctx.Attach(theNewPet.PetType); var updatedPet = _ctx.Update(theNewPet).Entity; _ctx.SaveChanges(); return(updatedPet); }