コード例 #1
0
        // GET: Rentals/Create
        public async Task <ActionResult> Create()
        {
            RentalViewModel rental = await HttpClientGenerics.Get <RentalViewModel>(_apiUrl, "/api/Rental/New");

            return(View(rental));
        }
コード例 #2
0
        // GET: Customers/Details/5
        public async Task <ActionResult> Details(int id)
        {
            Customer customer = await HttpClientGenerics.Get <Customer>(_apiUrl, "/api/Customer/", id.ToString());

            return(View(customer));
        }
コード例 #3
0
        // GET: Rentals/Details/5
        public async Task <ActionResult> Details(int id)
        {
            Rental rental = await HttpClientGenerics.Get <Rental>(_apiUrl, "/api/Rental/", id.ToString());

            return(View(rental));
        }
コード例 #4
0
        // GET: Films/Details/5
        public async Task <ActionResult> Details(int id)
        {
            Film film = await HttpClientGenerics.Get <Film>(_apiUrl, "/api/Film/", id.ToString());

            return(View(film));
        }