Пример #1
0
        public async Task <IActionResult> Edit(int id)
        {
            var editPub = await _pub.GetById(id);

            if (editPub == null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(editPub));
        }
Пример #2
0
        public async Task <IActionResult> GetById(int id)
        {
            var user = await _publisher.GetById(id);

            return(Ok(user));
        }
Пример #3
0
        public async Task <IActionResult> GetById(int id)
        {
            var pub = await _pub.GetById(id);

            return(Ok(pub));
        }