public void AddRequest(int id, string user) { var bar = _barRepo.GetBarById(id); var applicationUser = _repo.GetUserByUsername(user); var request = new Request { BarId = bar.Id, UserId = applicationUser.Id, DateRequested = DateTime.Now }; _repo.Add(request); _repo.SaveChanges(); }