Example #1
0
        public IEntityStrategy Create(string entityLogicalName)
        {
            var metadata = crmService.GetEntityMetadata(entityLogicalName);

            switch (entityLogicalName)
            {
            case "duplicaterule":
                return(new DuplicateRuleStrategy(metadata));

            case "duplicaterulecondition":
                return(new DuplicateRuleConditionStrategy(metadata));

            default:
                return(new DefaultEntityStrategy(metadata));
            }
        }