コード例 #1
0
 public IEnumerable <Locatie> GetLocaties(string gemeente = null, string straatnaam = null, string huisnummer = null, int?postcode = null)
 {
     if (string.IsNullOrEmpty(gemeente) && string.IsNullOrEmpty(straatnaam) && string.IsNullOrEmpty(huisnummer) && postcode == null)
     {
         return(_locatieRepository.GetAll().OrderBy(l => l.Gemeente));
     }
     return(_locatieRepository.GetBy(gemeente, straatnaam, huisnummer, postcode));
 }
        public object GetAll(string type)
        {
            switch (type)
            {
            case "Klant":
                return(_klantRepo.GetAll());

            case "Limousine":
                return(_limoRepo.GetAll());

            case "Locatie":
                return(_locaRepo.GetAll());

            case "Staffelkorting":
                return(_staffelRepo.GetAll());

            case "Reservering":
                return(_reserRepo.GetAll());

            default:
                break;
            }
            return(null);
        }