public HttpResponseMessage CompanyConfigData(BaseViewModel model) { try { IUnitOfWork uwork = new UnitOfWork(); ICountryService countrySerivce = new CountryService(new CountryRepository(uwork)); IBranchService branchService = new BranchService(new BranchRepository(uwork)); IDepartmentService deptService = new DepartmentService(new DepartmentRepository(uwork)); ILanguageService langService = new LanguageService(new LanguageRepository(uwork)); IEstimationTypeService estimationTypeService = new EstimationTypeService(new EstimationTypeRepository(uwork)); IEstimationSpecializedFieldService spetializeService = new EstimationSpecializedFieldService(new EstimationSpecializedFieldRepository(uwork)); IPartnerServiceTypeService partnerServiceType = new PartnerServiceTypeService(new PartnerServiceTypeRepository(uwork)); CompanyConfigData configData = new CompanyConfigData(); configData.ClientLocationType = Utility.getItemCultureList(Utility.ClientLocationType, model); configData.CompanyType = Utility.getItemCultureList(Utility.CompanyType, model); configData.RegPurposeType = Utility.getItemCultureList(Utility.RegPurposeType, model); configData.BranchOfficeList = branchService.GetAllBranchList(model); configData.AffiliateType = Utility.getItemCultureList(Utility.AffiliateType, model); configData.ActivityType = Utility.getItemCultureList(Utility.ActivityType, model); configData.ResultofActivity = Utility.getItemCultureList(Utility.ResultofActivity, model); configData.DepartmentList = deptService.GetAllDepartmentList(model); configData.LanguageList = langService.GetAllLanguageList(model); configData.EstimationTypeList = estimationTypeService.GetAllEstimationTypeList(model); configData.SpecializationList = spetializeService.GetAllEstimationSpecializedFieldList(model); configData.PriceCalculateTypeList = Utility.getItemCultureList(Utility.PriceCalculateTypeList, model); configData.PamentWayList = Utility.getItemCultureList(Utility.PaymentWayList, model); configData.PartnerServiceTypeList = partnerServiceType.GetAll(model); configData.PartnerTypeList = Utility.getItemCultureList(Utility.CompanyTransproTypeList, model); configData.DeliveryMethodList = service.GetDeliveryMethod(model); return(Request.CreateResponse(HttpStatusCode.OK, configData)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }