public Puppy CreatePuppy(Puppy puppy) { var pup = new Puppy() { Id = puppy.Id, Name = puppy.Name, Breed = puppy.Breed, Age = puppy.Age, OwnerId = puppy.OwnerId, Owner = puppy.Owner, }; _context.Puppies.Add(pup); _context.SaveChanges(); return(pup); }
public Owner CreateOwner(Owner owner) { var newOwner = new Owner() { Id = owner.Id, FirstName = owner.FirstName, LastName = owner.LastName, }; _context.Owners.Add(newOwner); _context.SaveChanges(); return(newOwner); }