Exemple #1
0
        public async Task <ActionResult> Details(int?id)
        {
            Blogpost blogpost = await _blogpostRepository.GetBlogpostById(id);

            #region Not Found (null) Check

            if (blogpost == null)
            {
                return(HttpNotFound());
            }

            #endregion

            return(View("~/Views/Blogpost/Details.cshtml", blogpost));
        }