public async Task <IEnumerable <GetBrand> > FindAll(int page, int size) { return(await _brandRepository.All().Page(page, size).Select(brand => new GetBrand { Id = brand.Id, Name = brand.Name }).ToListAsync()); }
public ActionResult Save(UserViewModel model) { var user = userRepository.All().SingleOrDefault(x => x.Id == model.Id); user.Email = model.Email; user.FullName = model.FullName; userRepository.Update(user); return(RedirectToAction("Index", "Home")); }
public override bool ValidateUser(string username, string password) { int user = _userRepository.All().Count(x => x.Email == username && x.Password == password); if (user != 0) { return(true); } return(false); }
public override bool ValidateUser(string username, string password) { int user = _userRepository.All().Count(x => x.ID_PENGGUNA == username && x.KAD_PENGENALAN == password); if (user != 0) { return(true); } else { return(false); } }
public ActionResult Index() { int count = companyRepository.All().Count(); if (count > 0) { var company = companyRepository.All().FirstOrDefault(); return(View(company)); } else { return(View()); } }
public async Task <IEnumerable <RoundServiceViewModel> > RetrieveAllRounds() { try { var rounds = await _roundRepository.All(); return(DataMapper.Map(rounds)); } catch (Exception ex) { Logger.WriteLogToFile(ex.Message, "RoundService", "RetrieveAllRounds"); } return(null); }
public async Task <IEnumerable <PlayerServiceViewModel> > RetrieveAllPlayers() { try { var players = await _playerRepository.All(); return(DataMapper.Map(players)); } catch (Exception ex) { Logger.WriteLogToFile(ex.Message, "PlayerService"); } return(null); }
public async Task <IEnumerable <GameServiceViewModel> > RetrieveAllGames() { try { var games = await _gameRepository.All(); return(DataMapper.Map(games)); } catch (Exception ex) { Logger.WriteLogToFile(ex.Message, "GameService", "RetrieveAllGames"); } return(null); }
// GET: Product public ActionResult Index() { return(View(productRepository.All())); }
// GET: Customer public ActionResult Index() { return(View(customerRepository.All())); }
public List <User> GetUsers(int id) { return(_userRepo.All().ToList()); }
public ActionResult Index() { return(View(invoiceRepository.All())); }