Beispiel #1
0
        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));
        }
Beispiel #2
0
		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);
		}