public TwitterApp GetItem(int id) { using (_connection = Utilities.Database.GetProfiledOpenConnection()) { return _connection.Get<TwitterApp>(id); } }
public RestaurantType Get(int id) { using (_connection = Utilities.GetProfiledOpenConnection()) { return _connection.Get<RestaurantType>(id); } }
public Veto Get(int id) { using (_connection = Utilities.GetProfiledOpenConnection()) { return _connection.Get<Veto>(id); } }
public Vote GetItem(int id) { using (_connection = Utilities.GetProfiledOpenConnection()) { return _connection.Get<Vote>(id); } }
public JobLog Get(int id) { using (_connection = Utilities.GetProfiledOpenConnection()) { return _connection.Get<JobLog>(id); } }
public ActionResult Edit(int id) { CarViewModel model; using (_connection = Utilities.GetOpenConnection()) { model = _connection.Get<CarViewModel>(id); } return View(model); }
public ActionResult Details(int id) { CarViewModel result; using (_connection = Utilities.GetOpenConnection()) { result = _connection.Get<CarViewModel>(id); } return View(result); }
public ActionResult Edit(string id) { GUIDTestViewModel model; using (_connection = Utilities.GetOpenConnection()) { model = _connection.Get<GUIDTestViewModel>(id); } return View(model); }
public ActionResult Details(string id) { GUIDTestViewModel result; using (_connection = Utilities.GetOpenConnection()) { result = _connection.Get<GUIDTestViewModel>(id); } return View(result); }
public ActionResult Edit(int id) { User model; using (_connection = Utilities.GetOpenConnection()) { model = _connection.Get<User>(id); } return View(UserAddEdit.MapUserToUserAddEdit(model)); }
public ActionResult Edit(int id) { Car model; using (_connection = Utilities.GetOpenConnection()) { model = _connection.Get<Car>(id); } return View(CarAddEdit.MapCarToCarAddEdit(model)); }
public User Get(int id, UserDependencies? dependencies) { using (_connection = Utilities.GetProfiledOpenConnection()) { var user = _connection.Get<User>(id); if ((dependencies & UserDependencies.Vetoes) == UserDependencies.Vetoes) { List<Veto> vetoes = null; if (user != null) vetoes = _vetoRepository.GetAll(user.Id).ToList(); if (vetoes != null) user.Vetoes = vetoes.FindAll(v => v.UserId == user.Id); } return user; } }
public Search GetItem(long id, SearchDependencies? dependencies = null) { using (_connection = Utilities.Database.GetProfiledOpenConnection()) { var entity = _connection.Get<Search>(id); if (entity != null) { if (dependencies != null) { entity.Logs = _searchHistoryLogRepository.GetItems(entity.SearchId); if (entity.Logs.Any()) { entity.LastLog = entity.Logs.OrderByDescending(l => l.SearchDate).First(); } } } return entity; } }