public RegionResponse Create(RegionViewModel re) { RegionResponse response = new RegionResponse(); try { Region addedRegion = unitOfWork.GetRegionRepository().Create(re.ConvertToRegion()); unitOfWork.Save(); response.Region = addedRegion.ConvertToRegionViewModel(); response.Success = true; } catch (Exception ex) { response.Region = new RegionViewModel(); response.Success = false; response.Message = ex.Message; } return(response); }