public ActionResult AssignDistrictToRegion(FormCollection collection) { Region aRegion = new Region { RegionId = Convert.ToInt32(collection["RegionId"]) }; List <District> districtList = new List <District>(); string[] tokens = collection["DistrictId"].Split(','); for (int i = 0; i < tokens.Length; i++) { districtList.Add(new District { DistrictId = Convert.ToInt32(tokens[i]) }); } aRegion.Districts = districtList; int rowAffected = _iRegionManager.AssignDristrictToRegion(aRegion); var regions = _iRegionManager.GetAll(); return(View(regions)); }