// GET: api/Banner public IQueryable <AdminVideoVM> Get() { try { var adminProjectVM = new List <AdminVideoVM>(); var videoModels = _projectImageService.GetMany(pi => pi.Type == 2 && pi.Deleted == false).AsQueryable(); foreach (var bm in videoModels) { var model = new AdminVideoVM() { ProjectImages = bm, EditedUser = _userFactory.GetUserNameById(bm.ModifiedById) }; adminProjectVM.Add(model); } return(adminProjectVM.AsQueryable()); } catch (Exception) { throw new Exception("Lỗi! Không thể tải dữ liệu!"); } }
// GET: api/Banner public IQueryable<AdminVideoVM> Get() { try { var adminProjectVM = new List<AdminVideoVM>(); var videoModels = _projectImageService.GetMany(pi => pi.Type == 2 && pi.Deleted == false).AsQueryable(); foreach (var bm in videoModels) { var model = new AdminVideoVM() { ProjectImages = bm, EditedUser = _userFactory.GetUserNameById(bm.ModifiedById) }; adminProjectVM.Add(model); } return adminProjectVM.AsQueryable(); } catch (Exception) { throw new Exception("Lỗi! Không thể tải dữ liệu!"); } }