public JsonResult Create(RegionDetailView vm)
        {
            CreateRegionRequest request = new CreateRegionRequest();

            request.RegionDescription = vm.RegionDescription;
            CreateRegionResponse response = _regionService.CreateRegion(request);

            return(Json(response));
        }
        public JsonResult Update(RegionDetailView vm)
        {
            GetRegionRequest request = new GetRegionRequest();

            request.RegionID = vm.RegionID;

            ModifyRegionRequest updateRequest = _regionService.GetRegion(request).Region.ConvertToModifyRegionRequest();

            updateRequest.RegionID          = vm.RegionID;
            updateRequest.RegionDescription = vm.RegionDescription;

            ModifyRegionResponse response = _regionService.ModifyRegion(updateRequest);

            return(Json(response));
        }
        public JsonResult GetDetail(System.Int32 id)
        {
            RegionDetailView vm      = new RegionDetailView();
            GetRegionRequest request = new GetRegionRequest();

            request.RegionID = id;
            GetRegionResponse response = _regionService.GetRegion(request);

            if (response.RegionFound)
            {
                vm = response.Region.ConvertToRegionDetailView();
            }

            return(Json(vm, JsonRequestBehavior.AllowGet));
        }