/// <summary>
        /// Get Pets by Person's gender
        /// </summary>
        /// <param name="petType">The Pet type</param>
        /// <remarks>Throws ArgumentNullException</remarks>
        /// <returns><see cref="Task{PetsByPersonGenderCollectionModel}"/></returns>
        public async Task <PetsByPersonGenderCollectionModel> GetPetsByPersonGender(Models.PetType petType)
        {
            var entitiesPetType = (Entities.PetType)(int) petType;

            var persons = await _petsRepository.GetPersonAndPets();

            //LINQ Query to get Pets by Person's gender and Pet type
            var entities = new PetsByPersonGenderCollection()
            {
                PetType            = entitiesPetType,
                PetsByPersonGender = persons.ToList()
                                     .Where(person => person.Pets != null)
                                     .GroupBy(person => person.Gender)
                                     .Select(g => new PetsByPersonGender
                {
                    Gender = g.Key,
                    Pets   = g.SelectMany(person => person.Pets.Where(pet => pet.Type == entitiesPetType)).OrderBy(x => x.Name)
                }).ToList()
            };

            //Map entities to models
            var models = _mapperService.Map(entities);

            return(models);
        }
        /// <summary>
        /// Get Pets by Person's gender
        /// </summary>
        /// <param name="petType">The Pet type</param>
        /// <remarks>Throws ArgumentNullException</remarks>
        /// <returns><see cref="Task{PetsByPersonGenderCollection}"/></returns>
        public async Task <PetsByPersonGenderCollection> GetPetsByPersonGender(PetType petType)
        {
            var persons = await _petsRepository.GetPersonAndPets();

            //LINQ Query to get Pets by Person's gender and Pet type
            return(new PetsByPersonGenderCollection()
            {
                PetsByPersonGender = persons.ToList()
                                     .Where(person => person.pets != null)
                                     .GroupBy(person => person.gender)
                                     .Select(g => new PetsByPersonGender
                {
                    Gender = g.Key,
                    Pets = g.SelectMany(person => person.pets.Where(pet => pet.type == petType))
                }).ToList()
            });
        }