/// <summary> /// Gets the .NET type from the AQD.Model.EntityType specified. /// </summary> /// <param name="typeOfEntity">The type of entity.</param> /// <returns>.NET type fo the entity or null if not found</returns> public static Type GetTypeFromEntityTypeEnum(EntityType typeOfEntity) { var ef = EntityFactoryFactory.GetFactory(typeOfEntity); return(ef != null?ef.Create().GetType() : null); }
/// <summary>Creates the entity collection for the types specified</summary> /// <typeparam name="T">type of the element to store in the collection</typeparam> protected static EntityCollection <T> CreateEntityCollection <T>() where T : EntityBase2, IEntity2 { return(new EntityCollection <T>(EntityFactoryFactory.GetFactory(typeof(T)))); }
/// <summary>Gets the factory of the entity with the .NET type specified</summary> /// <param name="typeOfEntity">The type of entity.</param> /// <returns>factory to use or null if not found</returns> public static IEntityFactory GetFactory(Type typeOfEntity) { return(EntityFactoryFactory.GetFactory(typeOfEntity)); }
/// <summary>Gets the factory of the entity with the integer version of AQD.Model.EntityType specified</summary> /// <param name="typeOfEntity">The type of entity.</param> /// <returns>factory to use or null if not found</returns> public static IEntityFactory GetFactory(int typeOfEntity) { return(EntityFactoryFactory.GetFactory((EntityType)typeOfEntity)); }
/// <summary>Gets the factory of the entity with the EntityTypeName specified</summary> /// <param name="typeOfEntity">The type of entity.</param> /// <returns>factory to use or null if not found</returns> public static IEntityFactory GetFactory(string typeOfEntity) { return(EntityFactoryFactory.GetFactory(typeOfEntity.ToEnum <EntityType>())); }
/// <inheritdoc/> protected override IEntityFactory GetEntityFactoryFromCache(int entityTypeEnumValue) { return(EntityFactoryFactory.GetFactory((SD.LLBLGen.Pro.Examples.EntityType)entityTypeEnumValue)); }
/// <inheritdoc/> protected override IEntityFactory GetEntityFactoryFromCache(int entityTypeEnumValue) { return(EntityFactoryFactory.GetFactory((Northwind.SSDAL.EntityType)entityTypeEnumValue)); }