public void AddBasicData(SurveyContext context) { var userManager = new ApplicationUserManager(new ApplicationUserStore(context)); var roleManager = new ApplicationRoleManager(new ApplicationRoleStore(context)); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("cadbeb33-4c7a-428c-9520-6756a00c8697"), Name = Role.SYSTEM_ADMINSTRATOR }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("6d923482-7907-422a-b054-1b58b1bbbc81"), Name = Role.PLATFORM_ADMINISTRATOR }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("c452e933-dc83-44f2-a3ab-59cf2eb7b0a2"), Name = Role.ORG_ADMINSTRATOR }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("09898aea-0925-4472-9124-11026a17302a"), Name = Role.ORG_TEAM_USER }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("f7bb6773-d74a-42aa-8686-333f5a753d24"), Name = Role.ORG_TEAM_MANAGER }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("1ee7f025-0c19-4cb8-a7c9-e24497833df3"), Name = Role.ORG_USER }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("453a3eee-2de3-47d5-b041-3ff01ea13cd9"), Name = Role.ORG_USER_MANAGMENT }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("9aaa8582-12fd-45d2-ac19-65d5f1deabfc"), Name = Role.ORG_PROJECT_MANAGMENT }); roleManager.AddOrUpdateRole(new Role { Id = Guid.Parse("52e030ef-e3d4-4976-b3d7-a2353978b099"), Name = Role.ORG_TEMPLATES_MANAGMENT }); var adminEmail = "*****@*****.**"; var superUser = new SuperUser() { Id = Guid.Parse("427eecf5-8ed4-4a6f-820d-7901acedf3bc"), UserName = adminEmail, Email = adminEmail }; userManager.AddOrUpdateUser(superUser, "!godAdmin-Lm0ht!"); userManager.AddToRole(superUser.Id, Role.SYSTEM_ADMINSTRATOR); context.AddressTypes.AddOrUpdate(new AddressType() { Id = Guid.Parse("2d006d8c-8543-42c7-a506-6b1a6570a7e1"), Name = "Home" }); context.AddressTypes.AddOrUpdate(new AddressType() { Id = Guid.Parse("5835af54-9f7e-4c59-bfe0-f990809e87d1"), Name = "Work" }); context.SaveChanges(); context.ContactNumberTypes.AddOrUpdate(new ContactNumberType() { Id = Guid.Parse("1cbe32a5-7398-4c23-b8df-91ff48c0c89d"), Name = "Home" }); context.ContactNumberTypes.AddOrUpdate(new ContactNumberType() { Id = Guid.Parse("4380daa1-7b94-463b-b544-1de512f3afe7"), Name = "Work" }); context.ContactNumberTypes.AddOrUpdate(new ContactNumberType() { Id = Guid.Parse("9eab2c57-e585-4505-a481-eb9c0bb1bfc5"), Name = "Mobile" }); context.SaveChanges(); context.OrgUserTypes.AddOrUpdate(new OrgUserType() { Id = Guid.Parse("22d3271a-0e84-440a-8bd1-644b2f10e9fb"), Order = 10, SystemName = "Administrator", Name = "Administrator" }); context.OrgUserTypes.AddOrUpdate(new OrgUserType() { Id = Guid.Parse("e8f53f9f-05e0-4d60-bb58-f9fe6f12b0a4"), Order = 20, SystemName = "Manager", Name = "Manager" }); context.OrgUserTypes.AddOrUpdate(new OrgUserType() { Id = Guid.Parse("379c989a-9919-4338-a468-a7c20eb76e28"), Order = 30, SystemName = "TeamUser", Name = "Team user" }); context.OrgUserTypes.AddOrUpdate(new OrgUserType() { Id = Guid.Parse("5c87861a-abdf-4d96-90b2-338ca761700b"), Order = 40, SystemName = "ExternalUser", Name = "External user" }); context.SaveChanges(); context.SeverityLevels.AddOrUpdate(new SeverityLevel() { Id = Guid.Parse("a4c21c55-efbf-4d48-a38a-1eec40bc9350"), Order = 10, SystemName = "Minimal", Name = "Minimal" }); context.SeverityLevels.AddOrUpdate(new SeverityLevel() { Id = Guid.Parse("70171c68-4e3c-4e40-ae4d-a88447756082"), Order = 20, SystemName = "Medium", Name = "Medium" }); context.SeverityLevels.AddOrUpdate(new SeverityLevel() { Id = Guid.Parse("7636b628-c520-4322-a0ac-2d467839fc89"), Order = 30, SystemName = "Critical", Name = "Critical" }); context.SaveChanges(); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("4825ad24-7154-4bfc-b64c-8717560b7e69"), Order = 10, SystemName = "Line", Name = "Line" }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("0d169039-1297-41b8-b9a3-9bc8208d9944"), Order = 20, SystemName = "Column", Name = "Column" }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("094b3eb0-c35b-4adb-ad42-3c44cfc4902d"), Order = 30, SystemName = "Bar", Name = "Bar" }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("b1edfba9-da27-4e56-b099-55480948b796"), Order = 40, SystemName = "Spline", Name = "Spline" }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("d01d3ee8-d495-449a-bb2b-eca2c5f53ff8"), Order = 50, SystemName = "Scatter ", Name = "Scatter " }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("49693931-94c0-4eb2-ad4b-ec6e95435cf1"), Order = 60, SystemName = "Area", Name = "Area" }); context.ChartSerieTypes.AddOrUpdate(new ChartSerieType() { Id = Guid.Parse("ae838bf8-6667-441f-ba0c-189fcdbe8b49"), Order = 70, SystemName = "Areaspline", Name = "Areaspline" }); context.SaveChanges(); context.AdultTitles.AddOrUpdate(new AdultTitle() { Id = Guid.Parse("e90cb5ae-bb34-4243-ad8d-6ff342d93724"), Order = 10, SystemName = "Dr", Name = "Dr" }); context.AdultTitles.AddOrUpdate(new AdultTitle() { Id = Guid.Parse("cb2b1034-2d7c-42fa-9756-ca7179d7ef7e"), Order = 20, SystemName = "Mrs", Name = "Mrs" }); context.AdultTitles.AddOrUpdate(new AdultTitle() { Id = Guid.Parse("9bc07951-45fd-4530-89b0-cd830eb6ff2d"), Order = 30, SystemName = "Mr", Name = "Mr" }); context.AdultTitles.AddOrUpdate(new AdultTitle() { Id = Guid.Parse("95a9763c-3bd8-4d94-b23f-9d5f51ef1f55"), Order = 40, SystemName = "Miss", Name = "Miss" }); context.SaveChanges(); context.ReportListDataTypes.AddOrUpdate(new ReportListDataType() { Id = Guid.Parse("18194a41-f23d-43ed-a298-8fc6a03c3a91"), Order = 10, SystemName = "Project", Name = "Project" }); context.ReportListDataTypes.AddOrUpdate(new ReportListDataType() { Id = Guid.Parse("1c342f84-6b92-4dd4-8d28-554d0a9cce9b"), Order = 40, SystemName = "Commentaries", Name = "Commentaries" }); context.SaveChanges(); context.Languages.AddOrUpdate(new Language() { Id = Guid.Parse("aa43288c-7da3-4bce-8086-3b8f0eb429c3"), Order = 10, SystemName = "English", Name = "English", Calture = "en-GB" }); context.Languages.AddOrUpdate(new Language() { Id = Guid.Parse("27f78e81-58de-473f-9609-357238d76445"), Order = 20, SystemName = "Persian", Name = "Persian", Calture = "fa-IR" }); context.SaveChanges(); context.Calendars.AddOrUpdate(new Calendar() { Id = Guid.Parse("36168adc-2462-4ad9-b1e0-9c37d4388143"), Order = 10, SystemName = "Gregorian", Name = "Gregorian" }); context.Calendars.AddOrUpdate(new Calendar() { Id = Guid.Parse("bf51856c-616c-4289-84e7-84ef9d282a4f"), Order = 20, SystemName = "Persian", Name = "Persian" }); context.SaveChanges(); context.AttachmentTypes.AddOrUpdate(new AttachmentType() { Id = Guid.Parse("53d7285b-0f7e-434e-9319-ca1b12c1344c"), Name = "Document", MaxFileSize = 1024, AllowedExtensions = "pages,doc,docx,txt,pdf,rtf,csv,xls,xlsx" }); context.AttachmentTypes.AddOrUpdate(new AttachmentType() { Id = Guid.Parse("9252a389-459b-48c9-81b8-475a6a35a706"), Name = "Image", MaxFileSize = 2048, AllowedExtensions = "jpg,jpeg,png,gif" }); context.AttachmentTypes.AddOrUpdate(new AttachmentType() { Id = Guid.Parse("d87266db-6fd1-4f9b-8afa-28b1af6bb5c6"), Name = "Audio", MaxFileSize = 2048, AllowedExtensions = "wav,mp3,m4a,wma,amr,aac,ogg" }); context.AttachmentTypes.AddOrUpdate(new AttachmentType() { Id = Guid.Parse("8022c0d5-ecc7-4ad0-be45-3cfc6c12f0a3"), Name = "Video", MaxFileSize = 8192, AllowedExtensions = "avi,mpg,mpeg,mp4,mov,wmv" }); context.SaveChanges(); context.Settings.AddOrUpdate(new Settings()); context.SaveChanges(); }