public IEnumerable <ConstituencyViewModel> GetAll(string name, int?constituencyTypeId, int?areaId, int?partyId, bool?current) { var constituencies = _constituencyRepository.GetAll(name, constituencyTypeId, areaId, partyId, current).Result; return(constituencies.Select(ModelTransformer.ConstituencyToConstituencyViewModel)); }
public List <ConstituencyViewModel> GetAll(bool inactive = false) { return(_constituencyRepository.GetAll(inactive).ToList() .Select(c => new ConstituencyViewModel(c)) as List <ConstituencyViewModel>); }