public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var technology = _technologyRepository.Get((int)id); if (technology == null) { return(HttpNotFound()); } return(View(technology)); }
public async Task <Knowledge> Get(Knowledge knowledge) { try { knowledge = await repository.Get(knowledge.Id); var tech = await techRepository.Get(knowledge.TechId); knowledge.Tech = tech; } catch (Exception ex) { NLog.Write(ex); knowledge = null; } return(knowledge); }