Exemple #1
0
        public IActionResult DogSearch(DogModel model)
        {
            List <Dog> dogs;

            if (model.Sex == "Both")
            {
                dogs = DogRepo.GetAllDogsByType(model.DogType);
            }
            else
            {
                dogs = DogRepo.GetAllDogsBySex(model.DogType, model.Sex);
            }
            List <DogModel> dogModels = util.ConvertToModel(dogs);

            return(View(dogModels));
        }