Exemple #1
0
        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));
        }
Exemple #2
0
        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);
        }