public MaintenanceCompanySpecialization FirstMaintenanceCompanySpecialization() { var firstMaintenanceCompanySpecialization = new MaintenanceCompanySpecialization { CompanyId = new Int32() , Years_Experience = new Int32() , NumberofEmployee = new Int32() , NumberofCertifitedEmplyee = new Int32() , Air_Conditioning = new Boolean() , Electrical = new Boolean() , Kitchen_Remodeling = new Boolean() , Architects = new Boolean() , Flooring = new Boolean() , Landscaping = new Boolean() , Asphalt_Paving = new Boolean() , General_Contracting = new Boolean() , Painting = new Boolean() , Basement_Finishing = new Boolean() , Handyman_Services = new Boolean() , Plumbing = new Boolean() , Bathroom_Remodeling = new Boolean() , Heating = new Boolean() , Roofing = new Boolean() , Concrete = new Boolean() , Home_Addition_Construction = new Boolean() , Siding = new Boolean() , Deck_Construction = new Boolean() , Home_Construction = new Boolean() , Tiling = new Boolean() , IsInsured = new Boolean() , Rate = new Double() , Currency = null, CurrencyID = new Int32() }; return firstMaintenanceCompanySpecialization; }
/// Initialize ProfileByType public void SpecialistInitialProfileValues(RegisterModel model, int specialistId) { if (specialistId != 0) { var nextCompanyId = UnitofWork.MaintenanceCompanyLookUpRepository.All.OrderByDescending(x => x.CompanyId) .First() .CompanyId + 1; var newMaintenanceCompanyLookUp = new MaintenanceCompanyLookUp { CompanyId = nextCompanyId, UserId = specialistId, Role = (int) LookUpRoles.Roles.Specialist }; var newMaintenanceCompany = new MaintenanceCompany { CompanyId = nextCompanyId, Name = model.UserName, EmailAddress = model.Email, GoogleMap = "USA", Country = "US", MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp // CountryCode = "US" }; var newMaintenanceCompanySpecialization = new MaintenanceCompanySpecialization { CompanyId = nextCompanyId, NumberofEmployee = 1, NumberofCertifitedEmplyee = 1, IsInsured = true, Rate = 50, CurrencyID = 1, Currency = "USD", MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceCustomService = new MaintenanceCustomService { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceExterior = new MaintenanceExterior { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceInterior = new MaintenanceInterior { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceNewConstruction = new MaintenanceNewConstruction { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceRepair = new MaintenanceRepair { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceUtility = new MaintenanceUtility { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var specialistwork = new SpecialistWork { PhotoPath = "./../images/dotimages/home-handyman-projects.jpg", SpecialistId = specialistId }; UnitofWork.MaintenanceCompanyLookUpRepository.Add(newMaintenanceCompanyLookUp); UnitofWork.MaintenanceCompanyRepository.Add(newMaintenanceCompany); UnitofWork.MaintenanceCompanySpecializationRepository.Add(newMaintenanceCompanySpecialization); UnitofWork.MaintenanceCustomServiceRepository.Add(newMaintenanceCustomService); UnitofWork.MaintenanceExteriorRepository.Add(newMaintenanceExterior); UnitofWork.MaintenanceInteriorRepository.Add(newMaintenanceInterior); UnitofWork.MaintenanceNewConstructionRepository.Add(newMaintenanceNewConstruction); UnitofWork.MaintenanceRepairRepository.Add(newMaintenanceRepair); UnitofWork.MaintenanceUtilityRepository.Add(newMaintenanceUtility); UnitofWork.SpecialistWorkRepository.Add(specialistwork); UnitofWork.Save(); } }