Example #1
0
        public IActionResult Post(Books books, string username, string password)
        {
            var admin = login.GetDetails(username, password);

            if (admin != null)
            {
                book.Add(books);
                book.Commit();
                return(Created("Book created", books));
            }
            else
            {
                return(NotFound("You are not an Admin"));
            }
        }