Exemplo n.º 1
0
        // GET: CategoryDB/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var category = await provider.Get((int)id);

            if (category == null)
            {
                return(NotFound());
            }
            return(View(mapper.Map <CategoryViewModel>(category)));
        }
Exemplo n.º 2
0
        // GET: TodoItemDB/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var todoItem = await provider.Get((int)id);

            if (todoItem == null)
            {
                return(NotFound());
            }
            return(View(mapper.Map <TodoItemViewModel>(todoItem)));
        }