public object Get(Whiskies whiskies) { if (whiskies.DistilleryId != Guid.Empty) { var distillery = distilleryRepository.Find(whiskies.DistilleryId); var distilleryWhiskies = whiskyRepository.FindByDistillery(distillery); return(distilleryWhiskies); } if (!string.IsNullOrWhiteSpace(whiskies.SearchFilter)) { return(whiskyRepository.Find(whiskies.SearchFilter)); } return(whiskyRepository.GetAll()); }
public object Get(Whiskies whiskies) { if (whiskies.DistilleryId != Guid.Empty) { var distillery = distilleryRepository.Find(whiskies.DistilleryId); var distilleryWhiskies = whiskyRepository.FindByDistillery(distillery); return distilleryWhiskies; } if (!string.IsNullOrWhiteSpace(whiskies.SearchFilter)) { return whiskyRepository.Find(whiskies.SearchFilter); } return whiskyRepository.GetAll(); }