public static void ApplyToRule(PassRule rule, PassRuleModel command) { rule.RuleId = command.RuleId > 0 ? command.RuleId : rule.RuleId; rule.Description = command.Description; rule.InternalType = command.InternalType; rule.Ignore = command.Ignore; rule.Type = command.Type; rule.Value = command.Value; rule.PeakValue = command.PeakValue; rule.CampaignType = command.CampaignType; }
private static PassRule MapToRule(PassRuleModel command) { return(new PassRule() { Description = command.Description, InternalType = command.InternalType, RuleId = command.RuleId, Type = command.Type, Ignore = command.Ignore, Value = command.Value, PeakValue = command.PeakValue, CampaignType = command.CampaignType }); }