/// <summary> /// Provides a database Vulnerability Assessment Rule Baseline model for the given database /// </summary> public VulnerabilityAssessmentRuleBaselineModel GetVulnerabilityAssessmentRuleBaseline(string resourceGroup, string serverName, string databaseName, string ruleId, bool ruleAppliesToMaster, ApplyToType applyToType) { var vulnerabilityAssessmentRuleBaseline = (applyToType == ApplyToType.Database) ? VulnerabilityAssessmentCommunicator.GetDatabaseVulnerabilityAssessmentRuleBaseline(resourceGroup, serverName, databaseName, ruleId, ruleAppliesToMaster) : VulnerabilityAssessmentCommunicator.GetManagedDatabaseVulnerabilityAssessmentRuleBaseline(resourceGroup, serverName, databaseName, ruleId, ruleAppliesToMaster); var ruleBaselineModel = new VulnerabilityAssessmentRuleBaselineModel() { ResourceGroupName = resourceGroup, RuleId = ruleId, RuleAppliesToMaster = ruleAppliesToMaster }; ruleBaselineModel.BaselineResult = new List <VulnerabilityAssessmentRuleBaselineRowModel>(); foreach (var baselineResult in vulnerabilityAssessmentRuleBaseline.BaselineResults) { var ruleBaselineItem = new VulnerabilityAssessmentRuleBaselineRowModel() { Result = baselineResult.Result }; ruleBaselineModel.BaselineResult.Add(ruleBaselineItem); } return(ruleBaselineModel); }