예제 #1
0
        public Pet AddPet(Pet pet)
        {
            ctx.Attach(pet).State = EntityState.Added;
            ctx.SaveChanges();

            return(pet);
        }
예제 #2
0
 public PetType AddPetType(PetType type)
 {
     ctx.Attach(type).State = EntityState.Added;
     ctx.SaveChanges();
     return(type);
 }
예제 #3
0
 public Owner AddOwner(Owner owner)
 {
     ctx.Attach(owner).State = EntityState.Added;
     ctx.SaveChanges();
     return(owner);
 }
예제 #4
0
 public Color AddColor(Color color)
 {
     ctx.Attach(color).State = EntityState.Added;
     ctx.SaveChanges();
     return(color);
 }
예제 #5
0
 public User AddUser(User user)
 {
     ctx.Attach(user).State = EntityState.Added;
     ctx.SaveChanges();
     return(user);
 }