public async Task <ActionResult> _Content(int Id) { var response = await WepApiMethod.SendApiAsync <DetailsKMCModel>(HttpVerbs.Get, $"KMC/Manage?id={Id}"); var model = new DetailsKMCModel(); if (response.isSuccess) { model = response.Data; } return(View(model)); }
public async Task <ActionResult> Details(int?Id) { if (Id == null) { throw new HttpException(404, "Page Not Found"); } var model = new DetailsKMCModel(); var response = await WepApiMethod.SendApiAsync <DetailsKMCModel>(HttpVerbs.Get, $"KMC/Manage?id={Id}"); if (response.isSuccess) { model = response.Data; } return(View(model)); }