// 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)); }
// 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)); }