public IEnumerable <ResourceViewModel> GetResourcesByCategory(string category) { List <ResourceViewModel> ret = new List <ResourceViewModel>(); var resources = (from c in _allReadyDataAccess.GetResourcesByCategory(category) select c).Distinct(); foreach (Resource resource in resources) { ret.Add(new ResourceViewModel(resource)); } return(ret); }
public List <Models.Resource> Handle(ResourcesByCategoryQuery message) { return(dataAccess.GetResourcesByCategory(message.Category).ToList()); }