public async Task <IActionResult> EditProvider(int id) { var groupItems = await GetGroupItems(); var repo = new ServiceProviderRepository(); var provider = await repo.GetByIdAsync(id); var model = new EditProviderViewModel { Provider = provider, GroupItems = groupItems, }; repo.Dispose(); return(View(model)); }
public async Task<IActionResult> EditProvider(int id) { var groupItems = await GetGroupItems(); var repo = new ServiceProviderRepository(); var provider = await repo.GetByIdAsync(id); var model = new EditProviderViewModel { Provider = provider, GroupItems = groupItems, }; repo.Dispose(); return View(model); }