Пример #1
0
        public async Task <IActionResult> GiveOutBook(BookViewModel model)
        {
            var success = await _booksProvider.GiveOutBookAsync(model.Id);

            if (!success)
            {
                return(View("ShowMessage", new MessageModel("/Librarian/BookDelivery", "Ошибка при выдаче книги", true)));
            }
            return(View("ShowMessage", new MessageModel("/Librarian/BookDelivery", "Книга успешно выдана", false, 1)));
        }