Esempio n. 1
0
        // GET: Books/Edit/5
        public async Task <IActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            DynamoDBServices service = new DynamoDBServices(dynamoDBClient);
            Book             book    = await service.GetBookAsync(id);

            //var book = await _context.Book.SingleOrDefaultAsync(m => m.Id == id);
            if (book == null)
            {
                return(NotFound());
            }
            return(View(book));
        }
Esempio n. 2
0
        // GET: Books/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            DynamoDBServices service = new DynamoDBServices(dynamoDBClient);
            Book             book    = await service.GetBookAsync(id);

            if (book == null)
            {
                return(NotFound());
            }

            return(View(book));
        }