public object Post(BookInformation submission)
 {
     var book = new Book()
     {
         Id = submission.Id,
         Title = submission.Title,
         Author = submission.Author,
         Price = submission.Price
     };
     int id = Repo.AddBook(book);
     return new {Id = id};
 }
Esempio n. 2
0
        public object Post(BookInformation request)
        {
            var book = new Book()
            {
                Id = request.Id,
                Author =  request.Author,
                Title = request.Title,
                Price = request.Price
            };

            int id = Repo.AddBook(book);
            return new {Id = id};
        }