public TypedObjectProvider(TypedObjectProviderDefinition _definition)
 {
     definition = _definition;
     name       = definition.name;
     map        = definition.mapDefinition;
     IsPrimary  = definition.IsPrimaryForEntityClass;
 }
        public TypedObjectProviderDefinition GetOrAdd(String typename, String namepath)
        {
            TypedObjectProviderDefinition output = null;

            output = providers.FirstOrDefault(x => x.ObjectTypeName == typename && x.EntityClassNamePath == namepath);

            if (output == null)
            {
                output = new TypedObjectProviderDefinition()
                {
                    ObjectTypeName      = typename,
                    EntityClassNamePath = namepath,
                    name = typename + namepath
                };
                providers.Add(output);
            }
            return(output);
        }