Exemplo n.º 1
0
 public static IQueryable<SelectListItem> GetCategorySelectOptions(ICategoryServices categoryServices, int accountId, CategoryTypeDTO type)
 {
     return categoryServices.All().Where(x => x.Type == type && x.Account_AccountID == accountId).Select(x => new SelectListItem {
         Value = x.CategoryID.ToString(),
         Text = x.Name
     }).AsQueryable();
 }
Exemplo n.º 2
0
 public static IQueryable<SelectListItem> GetCategorySelectOptions(ICategoryServices categoryServices)
 {
     return categoryServices.All().Select(x => new SelectListItem {
         Value = x.CategoryID.ToString(),
         Text = x.Name
     }).AsQueryable();
 }