/// <inheritdoc/> protected override IInheritanceInfoProvider GetInheritanceProvider() { return(ModelInfoProviderSingleton.GetInstance()); }
/// <summary>Creates a new IEntityField2 instance, which represents the field objectName.fieldName</summary> /// <param name="objectName">the name of the object the field belongs to, like CustomerEntity or OrdersTypedView</param> /// <param name="fieldName">the name of the field to create</param> public static IEntityField2 Create(string objectName, string fieldName) { return(new EntityField2(ModelInfoProviderSingleton.GetInstance().GetFieldInfo(objectName, fieldName))); }
/// <summary>Gets a predicateexpression which filters on this entity. Only useful in entity fetches</summary> /// <param name="negate">Optional flag to produce a NOT filter, (true), or a normal filter (false, default). </param> /// <returns>ready to use predicateexpression</returns> public new static IPredicateExpression GetEntityTypeFilter(bool negate = false) { return(ModelInfoProviderSingleton.GetInstance().GetEntityTypeFilter("DogEntity", negate)); }
/// <summary>General factory entrance method which will return an EntityFields2 object with the format generated by the factory specified</summary> /// <param name="relatedEntityType">The type of entity the fields are for</param> /// <returns>The IEntityFields instance requested</returns> public static IEntityFields2 CreateEntityFieldsObject(NWService.Dal.EntityType relatedEntityType) { return(ModelInfoProviderSingleton.GetInstance().GetEntityFields(relatedEntityType.ToString())); }
/// <summary>Creates a new IEntityField2 instance for usage in the EntityFields object for the entity related to the field index specified.</summary> /// <param name="fieldIndex">The field which IEntityField2 instance should be created</param> /// <returns>The IEntityField2 instance for the field specified in fieldIndex</returns> public static IEntityField2 Create(Enum fieldIndex) { return(new EntityField2(ModelInfoProviderSingleton.GetInstance().GetFieldInfo(fieldIndex))); }
/// <inheritdoc/> public override IPredicateExpression GetEntityTypeFilter(bool negate, string objectAlias) { return(ModelInfoProviderSingleton.GetInstance().GetEntityTypeFilter(this.ForEntityName, objectAlias, negate)); }
/// <inheritdoc/> public override IEntityFields2 CreateHierarchyFields() { return(_isInHierarchy ? new EntityFields2(ModelInfoProviderSingleton.GetInstance().GetHierarchyFields(this.ForEntityName), ModelInfoProviderSingleton.GetInstance(), null) : base.CreateHierarchyFields()); }
/// <inheritdoc/> public override IRelationCollection CreateHierarchyRelations(string objectAlias) { return(ModelInfoProviderSingleton.GetInstance().GetHierarchyRelations(this.ForEntityName, objectAlias)); }
/// <inheritdoc/> public override IEntityFactory2 GetEntityFactory(object[] fieldValues, Dictionary <string, int> entityFieldStartIndexesPerEntity) { return((IEntityFactory2)ModelInfoProviderSingleton.GetInstance().GetEntityFactory(this.ForEntityName, fieldValues, entityFieldStartIndexesPerEntity) ?? this); }
/// <inheritdoc/> public override IEntityFields2 CreateFields() { return(ModelInfoProviderSingleton.GetInstance().GetEntityFields(this.ForEntityName)); }
/// <inheritdoc/> public override IInheritanceInfoProvider ObtainInheritanceInfoProviderInstance() { return(ModelInfoProviderSingleton.GetInstance()); }
/// <summary>General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields.</summary> /// <param name="entityName">the name of the entity to get the fields for. Example: "CustomerEntity"</param> /// <returns>array of IEntityFieldCore fields, defined in the entity with the name specified</returns> internal static IEntityFieldCore[] CreateFields(string entityName) { return(ModelInfoProviderSingleton.GetInstance().GetEntityFieldsArray(entityName, PersistenceInfoProviderSingleton.GetInstance())); }
/// <summary>General factory entrance method which will return an EntityFields object with the format generated by the factory specified</summary> /// <param name="relatedEntityType">The type of entity the fields are for</param> /// <returns>The IEntityFields instance requested</returns> public static IEntityFields CreateEntityFieldsObject(SD.LLBLGen.Pro.Examples.EntityType relatedEntityType) { return(ModelInfoProviderSingleton.GetInstance().GetEntityFields(_entityTypeNamesCache[relatedEntityType], PersistenceInfoProviderSingleton.GetInstance())); }
/// <summary>Gets the projection to project the resultset of stored procedure HR.GetEmployeeClassifications to the typed view GetEmployeeClassificationsResult</summary> /// <returns>Projection in the form of a Dynamic Query which projects to <see cref="LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow"/> instances </returns> public DynamicQuery <LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow> GetGetEmployeeClassificationsResultTypedViewProjection() { return(this.Create().Select(ProjectionLambdaCreator.Create <LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow>(ModelInfoProviderSingleton.GetInstance().GetTypedViewFields("GetEmployeeClassificationsResultTypedView"), true))); }