Exemple #1
0
        public async Task <IActionResult> CreateBook(BookViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            await _booksProvider.CreateBookAsync(model);

            return(View("ShowMessage",
                        new MessageModel("/Librarian/Index", "Книга успешно добавлена", false, 1)));
        }