Пример #1
0
        public static void AddPet(PetData pet)
        {
            PetRepository petRep = new PetRepository();

            petRep.Create(new Pet
            {
                Nickname     = pet.Nickname,
                KindId       = pet.KindId,
                BreedId      = pet.BreedId,
                Conditions   = pet.Conditions,
                ArrivalDate  = pet.ArrivalDate,
                Color        = pet.Color,
                HealthStatus = pet.HealthStatus
            });
        }
Пример #2
0
 public ActionResult Create(Pet pet)
 {
     petRepo.Create(pet);
     return(RedirectToAction("Index"));
 }