Beispiel #1
0
 private IEnumerable <SelectListItem> GetFrequenciesForDropDown()
 {
     return(_blFrequency.GetAll().Select(x => new SelectListItem()
     {
         Text = x.Name,
         Value = x.Id.ToString()
     }));
 }
Beispiel #2
0
        public HomeViewModel GetHomeModel()
        {
            var allServices = _blService.GetAll();

            return(new HomeViewModel()
            {
                Services = allServices.Select(x => x.ServiceModel).ToList(),
                Categories = _blCategory.GetAll().Where(x => allServices.Any(y => y.ServiceModel.CategoryId == x.Id)).OrderBy(x => x.Name).ToList()
            });
        }
 public IActionResult GetAll()
 {
     return(Json(new { data = _blFrequency.GetAll() }));
 }
Beispiel #4
0
 public IActionResult GetAll()
 {
     return(Json(new { data = _blCategory.GetAll() }));
 }