public Pet CreatePet(Pet pet) { _context.Attach(pet).State = EntityState.Added; _context.SaveChanges(); return(pet); /*var productToCreate = _context.Pets.Add(pet).Entity; * _context.SaveChanges(); * return productToCreate;*/ }
public Owner CreateOwner(Owner owner) { _context.Attach(owner).State = EntityState.Added; _context.SaveChanges(); return(owner); }