Esempio n. 1
0
        public async Task <IActionResult> MapWards(int AreaId, string AreaName)
        {
            var wardList = await wardService.GetWardByAreaId(AreaId).ConfigureAwait(true);

            foreach (var item in wardList)
            {
                item.InitialAreaId   = AreaId;
                item.InitialAreaName = AreaName;
            }

            SetViewBags(AreaId, AreaName);
            if (wardList is null)
            {
                throw new Exception("wardList is null");
            }
            return(View(wardList));
        }