public void Get(IModelRequest request) { Book book = BookStore.GetBook(request.ResourceName); if (book == null) { request.NotFound(); } else { request.Model(book); } }
public void Get(IModelRequest req) { var customer = customers.FindById(new ObjectId(req.PathParam("id"))); if (customer == null) { req.NotFound(); } else { req.Model(customer); } }