private bool createSecuritySeedData() { // Javad: // 1) all the create operations should check for existence of the record // 2) failure on creating any record should rollback the whole seed data generation. It is one transaction. // 3) failues should throw an exception with enough information to pin point the root cause // 4) only seed data related to the functions of this modules should be genereated here. // BUG: seed data creation is not working because of the changes that were done in the entities and services. // TODO: reimplement the seed data creation method. //#region Security //// Tasks using (var operationManager = new OperationManager()) using (var featureManager = new FeatureManager()) { var root = featureManager.FindRoots().FirstOrDefault(); if (featureManager.Exists("Business administration module (BAM)", root)) { return(false); } var bamFeature = featureManager.Create("Business administration module (BAM)", "", root); if (featureManager.Exists("Party", bamFeature)) { return(true); } var partyFeature = featureManager.Create("Party", "", bamFeature); var partyOperation = operationManager.Create("BAM", "Party", "*", partyFeature); var partyServiceOperation = operationManager.Create("BAM", "PartyService", "*"); var partyHelp = operationManager.Create("BAM", "Help", "*"); return(true); } }