Upload to server

uploading
This commit is contained in:
2025-08-02 05:20:17 +07:00
commit a5eccbd452
984 changed files with 3031800 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Class to define dynamic relations for queries.</summary>
[Serializable]
public class DynamicRelation : DynamicRelationBase
{
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand, which can only be a derived table definition. No join will take place. </param>
/// <remarks>If a DynamicRelation is created with this CTor, it has to be the only one. It will be ignored if there are more relations in the relation collection.</remarks>
public DynamicRelation(DerivedTableDefinition leftOperand)
{
this.InitClass(JoinHint.None, string.Empty, string.Empty, null, leftOperand, null);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, IPredicate onClause)
{
this.InitClass(joinType, string.Empty, string.Empty, onClause, leftOperand, rightOperand);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand which is a field.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is a derived table.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, string aliasLeftOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, string.Empty, onClause, leftOperand, rightOperand);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity type.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand));
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand, which is an entity.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(Datalib.EntityType leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, GeneralEntityFactory.Create(leftOperand), GeneralEntityFactory.Create(rightOperand));
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand which is a field.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand));
}
/// <inheritdoc/>
protected override IInheritanceInfoProvider GetInheritanceProvider() { return ModelInfoProviderSingleton.GetInstance(); }
}
}

View File

@@ -0,0 +1,66 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>EntityCollection implementation which is used for backwards compatibility and for design time databinding.</summary>
[Serializable]
public partial class EntityCollection : EntityCollectionNonGeneric
{
/// <summary>CTor</summary>
public EntityCollection() : base() { }
/// <summary>CTor</summary>
/// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param>
public EntityCollection(IEntityFactory2 entityFactoryToUse) : base(entityFactoryToUse) { }
/// <summary>Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected EntityCollection(SerializationInfo info, StreamingContext context) : base(info, context) { }
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCollectionCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Generic entity collection class which replaces the original generated, non strongly typed EntityCollection variant.</summary>
[Serializable]
public partial class EntityCollection<TEntity> : EntityCollectionBase2<TEntity>
where TEntity : EntityBase2, IEntity2
{
/// <summary>CTor which determines the factory to use from the generic type argument, unless TEntity is an abstract entity.</summary>
public EntityCollection() : base((IEntityFactory2)null) { }
/// <summary>CTor</summary>
/// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param>
public EntityCollection(IEntityFactory2 entityFactoryToUse) : base(entityFactoryToUse) { }
/// <summary>CTor</summary>
/// <param name="initialContents">initial contents for this collection</param>
public EntityCollection(IEnumerable<TEntity> initialContents ) : base(initialContents) { }
/// <summary>Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected EntityCollection(SerializationInfo info, StreamingContext context) : base(info, context) { }
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCollectionCodeGeneric
// __LLBLGENPRO_USER_CODE_REGION_END
}
}

View File

@@ -0,0 +1,150 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>Field Creation Class for entity TblFieldEntity</summary>
public partial class TblFieldFields
{
/// <summary>Creates a new TblFieldEntity.Description field instance</summary>
public static EntityField2 Description { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.Description); }}
/// <summary>Creates a new TblFieldEntity.FieldId field instance</summary>
public static EntityField2 FieldId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.FieldId); }}
/// <summary>Creates a new TblFieldEntity.FieldName field instance</summary>
public static EntityField2 FieldName { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.FieldName); }}
/// <summary>Creates a new TblFieldEntity.Prefix field instance</summary>
public static EntityField2 Prefix { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.Prefix); }}
/// <summary>Creates a new TblFieldEntity.SubjectId field instance</summary>
public static EntityField2 SubjectId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.SubjectId); }}
/// <summary>Creates a new TblFieldEntity.UniqueId field instance</summary>
public static EntityField2 UniqueId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblFieldFieldIndex.UniqueId); }}
}
/// <summary>Field Creation Class for entity TblQuestionEntity</summary>
public partial class TblQuestionFields
{
/// <summary>Creates a new TblQuestionEntity.Answer field instance</summary>
public static EntityField2 Answer { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Answer); }}
/// <summary>Creates a new TblQuestionEntity.Content field instance</summary>
public static EntityField2 Content { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Content); }}
/// <summary>Creates a new TblQuestionEntity.CreateDate field instance</summary>
public static EntityField2 CreateDate { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.CreateDate); }}
/// <summary>Creates a new TblQuestionEntity.Difficulty field instance</summary>
public static EntityField2 Difficulty { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Difficulty); }}
/// <summary>Creates a new TblQuestionEntity.Exclusive field instance</summary>
public static EntityField2 Exclusive { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Exclusive); }}
/// <summary>Creates a new TblQuestionEntity.Explaination field instance</summary>
public static EntityField2 Explaination { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Explaination); }}
/// <summary>Creates a new TblQuestionEntity.FieldId field instance</summary>
public static EntityField2 FieldId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.FieldId); }}
/// <summary>Creates a new TblQuestionEntity.Level field instance</summary>
public static EntityField2 Level { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Level); }}
/// <summary>Creates a new TblQuestionEntity.QuestionCode field instance</summary>
public static EntityField2 QuestionCode { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.QuestionCode); }}
/// <summary>Creates a new TblQuestionEntity.QuestionId field instance</summary>
public static EntityField2 QuestionId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.QuestionId); }}
/// <summary>Creates a new TblQuestionEntity.SubjectId field instance</summary>
public static EntityField2 SubjectId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.SubjectId); }}
/// <summary>Creates a new TblQuestionEntity.Summary field instance</summary>
public static EntityField2 Summary { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuestionFieldIndex.Summary); }}
}
/// <summary>Field Creation Class for entity TblQuizEntity</summary>
public partial class TblQuizFields
{
/// <summary>Creates a new TblQuizEntity.QuizCode field instance</summary>
public static EntityField2 QuizCode { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizCode); }}
/// <summary>Creates a new TblQuizEntity.QuizId field instance</summary>
public static EntityField2 QuizId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizId); }}
/// <summary>Creates a new TblQuizEntity.QuizName field instance</summary>
public static EntityField2 QuizName { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizName); }}
/// <summary>Creates a new TblQuizEntity.QuizTemplateId field instance</summary>
public static EntityField2 QuizTemplateId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizTemplateId); }}
/// <summary>Creates a new TblQuizEntity.QuizTime field instance</summary>
public static EntityField2 QuizTime { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizTime); }}
/// <summary>Creates a new TblQuizEntity.QuizYear field instance</summary>
public static EntityField2 QuizYear { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizFieldIndex.QuizYear); }}
}
/// <summary>Field Creation Class for entity TblQuizQuestionEntity</summary>
public partial class TblQuizQuestionFields
{
/// <summary>Creates a new TblQuizQuestionEntity.QuestionId field instance</summary>
public static EntityField2 QuestionId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizQuestionFieldIndex.QuestionId); }}
/// <summary>Creates a new TblQuizQuestionEntity.QuizId field instance</summary>
public static EntityField2 QuizId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizQuestionFieldIndex.QuizId); }}
/// <summary>Creates a new TblQuizQuestionEntity.QuizTemplateId field instance</summary>
public static EntityField2 QuizTemplateId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizQuestionFieldIndex.QuizTemplateId); }}
/// <summary>Creates a new TblQuizQuestionEntity.TrainingTypeId field instance</summary>
public static EntityField2 TrainingTypeId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizQuestionFieldIndex.TrainingTypeId); }}
/// <summary>Creates a new TblQuizQuestionEntity.UniqueId field instance</summary>
public static EntityField2 UniqueId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizQuestionFieldIndex.UniqueId); }}
}
/// <summary>Field Creation Class for entity TblQuizTemplateEntity</summary>
public partial class TblQuizTemplateFields
{
/// <summary>Creates a new TblQuizTemplateEntity.FooterDes field instance</summary>
public static EntityField2 FooterDes { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.FooterDes); }}
/// <summary>Creates a new TblQuizTemplateEntity.HeaderDes field instance</summary>
public static EntityField2 HeaderDes { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.HeaderDes); }}
/// <summary>Creates a new TblQuizTemplateEntity.QuizTemplateCode field instance</summary>
public static EntityField2 QuizTemplateCode { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.QuizTemplateCode); }}
/// <summary>Creates a new TblQuizTemplateEntity.QuizTemplateId field instance</summary>
public static EntityField2 QuizTemplateId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.QuizTemplateId); }}
/// <summary>Creates a new TblQuizTemplateEntity.Renumering field instance</summary>
public static EntityField2 Renumering { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.Renumering); }}
/// <summary>Creates a new TblQuizTemplateEntity.TemplateQuizName field instance</summary>
public static EntityField2 TemplateQuizName { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.TemplateQuizName); }}
/// <summary>Creates a new TblQuizTemplateEntity.TrainingTypeId field instance</summary>
public static EntityField2 TrainingTypeId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateFieldIndex.TrainingTypeId); }}
}
/// <summary>Field Creation Class for entity TblQuizTemplateDetailEntity</summary>
public partial class TblQuizTemplateDetailFields
{
/// <summary>Creates a new TblQuizTemplateDetailEntity.Difficulty field instance</summary>
public static EntityField2 Difficulty { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.Difficulty); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.FieldId field instance</summary>
public static EntityField2 FieldId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.FieldId); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.Level field instance</summary>
public static EntityField2 Level { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.Level); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.QuestionNum field instance</summary>
public static EntityField2 QuestionNum { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.QuestionNum); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.QuizTemplateId field instance</summary>
public static EntityField2 QuizTemplateId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.QuizTemplateId); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.SubjectId field instance</summary>
public static EntityField2 SubjectId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.SubjectId); }}
/// <summary>Creates a new TblQuizTemplateDetailEntity.UniqueId field instance</summary>
public static EntityField2 UniqueId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblQuizTemplateDetailFieldIndex.UniqueId); }}
}
/// <summary>Field Creation Class for entity TblSubjectEntity</summary>
public partial class TblSubjectFields
{
/// <summary>Creates a new TblSubjectEntity.SubjectDes field instance</summary>
public static EntityField2 SubjectDes { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblSubjectFieldIndex.SubjectDes); }}
/// <summary>Creates a new TblSubjectEntity.SubjectId field instance</summary>
public static EntityField2 SubjectId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblSubjectFieldIndex.SubjectId); }}
/// <summary>Creates a new TblSubjectEntity.SubjectName field instance</summary>
public static EntityField2 SubjectName { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblSubjectFieldIndex.SubjectName); }}
}
/// <summary>Field Creation Class for entity TblTrainingTypeEntity</summary>
public partial class TblTrainingTypeFields
{
/// <summary>Creates a new TblTrainingTypeEntity.TrainingTypeId field instance</summary>
public static EntityField2 TrainingTypeId { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblTrainingTypeFieldIndex.TrainingTypeId); }}
/// <summary>Creates a new TblTrainingTypeEntity.TrainingTypeName field instance</summary>
public static EntityField2 TrainingTypeName { get { return ModelInfoProviderSingleton.GetInstance().CreateField2(TblTrainingTypeFieldIndex.TrainingTypeName); }}
}
}

View File

@@ -0,0 +1,114 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.Linq;
using System.Collections.Generic;
using SD.LLBLGen.Pro.LinqSupportClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using Datalib.EntityClasses;
using Datalib.FactoryClasses;
namespace Datalib.Linq
{
/// <summary>Meta-data class for the construction of Linq queries which are to be executed using LLBLGen Pro code.</summary>
public partial class LinqMetaData: ILinqMetaData
{
/// <summary>CTor. Using this ctor will leave the IDataAccessAdapter object to use empty. To be able to execute the query, an IDataAccessAdapter instance
/// is required, and has to be set on the LLBLGenProProvider2 object in the query to execute. </summary>
public LinqMetaData() : this(null, null) { }
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data till they go out of scope.</remarks>
public LinqMetaData(IDataAccessAdapter adapterToUse) : this (adapterToUse, null) { }
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
/// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data till they go out of scope.</remarks>
public LinqMetaData(IDataAccessAdapter adapterToUse, FunctionMappingStore customFunctionMappings)
{
this.AdapterToUse = adapterToUse;
this.CustomFunctionMappings = customFunctionMappings;
}
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
/// <param name="typeOfEntity">the type of the entity to get the datasource for</param>
/// <returns>the requested datasource</returns>
public IDataSource GetQueryableForEntity(int typeOfEntity)
{
switch((Datalib.EntityType)typeOfEntity)
{
case Datalib.EntityType.TblFieldEntity:
return this.TblField;
case Datalib.EntityType.TblQuestionEntity:
return this.TblQuestion;
case Datalib.EntityType.TblQuizEntity:
return this.TblQuiz;
case Datalib.EntityType.TblQuizQuestionEntity:
return this.TblQuizQuestion;
case Datalib.EntityType.TblQuizTemplateEntity:
return this.TblQuizTemplate;
case Datalib.EntityType.TblQuizTemplateDetailEntity:
return this.TblQuizTemplateDetail;
case Datalib.EntityType.TblSubjectEntity:
return this.TblSubject;
case Datalib.EntityType.TblTrainingTypeEntity:
return this.TblTrainingType;
default:
return null;
}
}
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
/// <typeparam name="TEntity">the type of the entity to get the datasource for</typeparam>
/// <returns>the requested datasource</returns>
public DataSource2<TEntity> GetQueryableForEntity<TEntity>()
where TEntity : class
{
return new DataSource2<TEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse);
}
/// <summary>returns the datasource to use in a Linq query when targeting TblFieldEntity instances in the database.</summary>
public DataSource2<TblFieldEntity> TblField { get { return new DataSource2<TblFieldEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblQuestionEntity instances in the database.</summary>
public DataSource2<TblQuestionEntity> TblQuestion { get { return new DataSource2<TblQuestionEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblQuizEntity instances in the database.</summary>
public DataSource2<TblQuizEntity> TblQuiz { get { return new DataSource2<TblQuizEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblQuizQuestionEntity instances in the database.</summary>
public DataSource2<TblQuizQuestionEntity> TblQuizQuestion { get { return new DataSource2<TblQuizQuestionEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblQuizTemplateEntity instances in the database.</summary>
public DataSource2<TblQuizTemplateEntity> TblQuizTemplate { get { return new DataSource2<TblQuizTemplateEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblQuizTemplateDetailEntity instances in the database.</summary>
public DataSource2<TblQuizTemplateDetailEntity> TblQuizTemplateDetail { get { return new DataSource2<TblQuizTemplateDetailEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblSubjectEntity instances in the database.</summary>
public DataSource2<TblSubjectEntity> TblSubject { get { return new DataSource2<TblSubjectEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary>returns the datasource to use in a Linq query when targeting TblTrainingTypeEntity instances in the database.</summary>
public DataSource2<TblTrainingTypeEntity> TblTrainingType { get { return new DataSource2<TblTrainingTypeEntity>(this.AdapterToUse, new ElementCreator(), this.CustomFunctionMappings, this.ContextToUse); } }
/// <summary> Gets / sets the IDataAccessAdapter to use for the queries created with this meta data object.</summary>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
/// till they go out of scope.</remarks>
public IDataAccessAdapter AdapterToUse { get; set; }
/// <summary>Gets or sets the custom function mappings to use. These take higher precedence than the ones in the DQE to use</summary>
public FunctionMappingStore CustomFunctionMappings { get; set; }
/// <summary>Gets or sets the Context instance to use for entity fetches.</summary>
public Context ContextToUse { get; set; }
}
}

View File

@@ -0,0 +1,151 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro v5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>Singleton implementation of the ModelInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
public static class ModelInfoProviderSingleton
{
private static readonly IModelInfoProvider _providerInstance = new ModelInfoProviderCore();
/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
static ModelInfoProviderSingleton() { }
/// <summary>Gets the singleton instance of the ModelInfoProviderCore</summary>
/// <returns>Instance of the FieldInfoProvider.</returns>
public static IModelInfoProvider GetInstance()
{
return _providerInstance;
}
}
/// <summary>Actual implementation of the ModelInfoProvider.</summary>
internal class ModelInfoProviderCore : ModelInfoProviderBase
{
/// <summary>Initializes a new instance of the <see cref="ModelInfoProviderCore"/> class.</summary>
internal ModelInfoProviderCore()
{
Init();
}
/// <summary>Method which initializes the internal datastores.</summary>
private void Init()
{
this.InitClass();
InitTblFieldEntityInfo();
InitTblQuestionEntityInfo();
InitTblQuizEntityInfo();
InitTblQuizQuestionEntityInfo();
InitTblQuizTemplateEntityInfo();
InitTblQuizTemplateDetailEntityInfo();
InitTblSubjectEntityInfo();
InitTblTrainingTypeEntityInfo();
this.BuildInternalStructures();
}
/// <summary>Inits TblFieldEntity's info objects</summary>
private void InitTblFieldEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblFieldFieldIndex), "TblFieldEntity");
this.AddElementFieldInfo("TblFieldEntity", "Description", typeof(System.String), false, false, false, true, (int)TblFieldFieldIndex.Description, 536870911, 0, 0);
this.AddElementFieldInfo("TblFieldEntity", "FieldId", typeof(System.String), false, false, false, true, (int)TblFieldFieldIndex.FieldId, 1, 0, 0);
this.AddElementFieldInfo("TblFieldEntity", "FieldName", typeof(System.String), false, false, false, true, (int)TblFieldFieldIndex.FieldName, 50, 0, 0);
this.AddElementFieldInfo("TblFieldEntity", "Prefix", typeof(System.String), false, false, false, true, (int)TblFieldFieldIndex.Prefix, 255, 0, 0);
this.AddElementFieldInfo("TblFieldEntity", "SubjectId", typeof(System.String), false, true, false, true, (int)TblFieldFieldIndex.SubjectId, 2, 0, 0);
this.AddElementFieldInfo("TblFieldEntity", "UniqueId", typeof(System.String), true, false, false, false, (int)TblFieldFieldIndex.UniqueId, 32, 0, 0);
}
/// <summary>Inits TblQuestionEntity's info objects</summary>
private void InitTblQuestionEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblQuestionFieldIndex), "TblQuestionEntity");
this.AddElementFieldInfo("TblQuestionEntity", "Answer", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Answer, 536870911, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Content", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Content, 536870911, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "CreateDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblQuestionFieldIndex.CreateDate, 0, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Difficulty", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Difficulty, 1, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Exclusive", typeof(System.Boolean), false, false, false, false, (int)TblQuestionFieldIndex.Exclusive, 2, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Explaination", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Explaination, 536870911, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "FieldId", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.FieldId, 1, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Level", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Level, 1, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "QuestionCode", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.QuestionCode, 10, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "QuestionId", typeof(System.String), true, false, false, false, (int)TblQuestionFieldIndex.QuestionId, 32, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "SubjectId", typeof(System.String), false, true, false, true, (int)TblQuestionFieldIndex.SubjectId, 2, 0, 0);
this.AddElementFieldInfo("TblQuestionEntity", "Summary", typeof(System.String), false, false, false, true, (int)TblQuestionFieldIndex.Summary, 536870911, 0, 0);
}
/// <summary>Inits TblQuizEntity's info objects</summary>
private void InitTblQuizEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblQuizFieldIndex), "TblQuizEntity");
this.AddElementFieldInfo("TblQuizEntity", "QuizCode", typeof(System.String), false, false, false, true, (int)TblQuizFieldIndex.QuizCode, 255, 0, 0);
this.AddElementFieldInfo("TblQuizEntity", "QuizId", typeof(System.String), true, false, false, false, (int)TblQuizFieldIndex.QuizId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizEntity", "QuizName", typeof(System.String), false, false, false, true, (int)TblQuizFieldIndex.QuizName, 255, 0, 0);
this.AddElementFieldInfo("TblQuizEntity", "QuizTemplateId", typeof(System.String), false, true, false, true, (int)TblQuizFieldIndex.QuizTemplateId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizEntity", "QuizTime", typeof(Nullable<System.Int32>), false, false, false, true, (int)TblQuizFieldIndex.QuizTime, 0, 0, 10);
this.AddElementFieldInfo("TblQuizEntity", "QuizYear", typeof(Nullable<System.Int32>), false, false, false, true, (int)TblQuizFieldIndex.QuizYear, 0, 0, 10);
}
/// <summary>Inits TblQuizQuestionEntity's info objects</summary>
private void InitTblQuizQuestionEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblQuizQuestionFieldIndex), "TblQuizQuestionEntity");
this.AddElementFieldInfo("TblQuizQuestionEntity", "QuestionId", typeof(System.String), false, true, false, true, (int)TblQuizQuestionFieldIndex.QuestionId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizQuestionEntity", "QuizId", typeof(System.String), false, true, false, false, (int)TblQuizQuestionFieldIndex.QuizId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizQuestionEntity", "QuizTemplateId", typeof(System.String), false, false, false, false, (int)TblQuizQuestionFieldIndex.QuizTemplateId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizQuestionEntity", "TrainingTypeId", typeof(System.String), false, false, false, false, (int)TblQuizQuestionFieldIndex.TrainingTypeId, 2, 0, 0);
this.AddElementFieldInfo("TblQuizQuestionEntity", "UniqueId", typeof(System.String), true, false, false, false, (int)TblQuizQuestionFieldIndex.UniqueId, 32, 0, 0);
}
/// <summary>Inits TblQuizTemplateEntity's info objects</summary>
private void InitTblQuizTemplateEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblQuizTemplateFieldIndex), "TblQuizTemplateEntity");
this.AddElementFieldInfo("TblQuizTemplateEntity", "FooterDes", typeof(System.String), false, false, false, true, (int)TblQuizTemplateFieldIndex.FooterDes, 536870911, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "HeaderDes", typeof(System.String), false, false, false, true, (int)TblQuizTemplateFieldIndex.HeaderDes, 536870911, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "QuizTemplateCode", typeof(System.String), false, false, false, true, (int)TblQuizTemplateFieldIndex.QuizTemplateCode, 255, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "QuizTemplateId", typeof(System.String), true, false, false, false, (int)TblQuizTemplateFieldIndex.QuizTemplateId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "Renumering", typeof(System.Boolean), false, false, false, false, (int)TblQuizTemplateFieldIndex.Renumering, 2, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "TemplateQuizName", typeof(System.String), false, false, false, true, (int)TblQuizTemplateFieldIndex.TemplateQuizName, 255, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateEntity", "TrainingTypeId", typeof(System.String), false, true, false, false, (int)TblQuizTemplateFieldIndex.TrainingTypeId, 2, 0, 0);
}
/// <summary>Inits TblQuizTemplateDetailEntity's info objects</summary>
private void InitTblQuizTemplateDetailEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblQuizTemplateDetailFieldIndex), "TblQuizTemplateDetailEntity");
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "Difficulty", typeof(System.String), false, false, false, true, (int)TblQuizTemplateDetailFieldIndex.Difficulty, 1, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "FieldId", typeof(System.String), false, false, false, true, (int)TblQuizTemplateDetailFieldIndex.FieldId, 1, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "Level", typeof(System.String), false, false, false, true, (int)TblQuizTemplateDetailFieldIndex.Level, 1, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "QuestionNum", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblQuizTemplateDetailFieldIndex.QuestionNum, 0, 0, 5);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "QuizTemplateId", typeof(System.String), false, true, false, true, (int)TblQuizTemplateDetailFieldIndex.QuizTemplateId, 32, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "SubjectId", typeof(System.String), false, false, false, true, (int)TblQuizTemplateDetailFieldIndex.SubjectId, 2, 0, 0);
this.AddElementFieldInfo("TblQuizTemplateDetailEntity", "UniqueId", typeof(System.String), true, false, false, false, (int)TblQuizTemplateDetailFieldIndex.UniqueId, 32, 0, 0);
}
/// <summary>Inits TblSubjectEntity's info objects</summary>
private void InitTblSubjectEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblSubjectFieldIndex), "TblSubjectEntity");
this.AddElementFieldInfo("TblSubjectEntity", "SubjectDes", typeof(System.String), false, false, false, true, (int)TblSubjectFieldIndex.SubjectDes, 536870911, 0, 0);
this.AddElementFieldInfo("TblSubjectEntity", "SubjectId", typeof(System.String), true, false, false, false, (int)TblSubjectFieldIndex.SubjectId, 2, 0, 0);
this.AddElementFieldInfo("TblSubjectEntity", "SubjectName", typeof(System.String), false, false, false, true, (int)TblSubjectFieldIndex.SubjectName, 50, 0, 0);
}
/// <summary>Inits TblTrainingTypeEntity's info objects</summary>
private void InitTblTrainingTypeEntityInfo()
{
this.AddFieldIndexEnumForElementName(typeof(TblTrainingTypeFieldIndex), "TblTrainingTypeEntity");
this.AddElementFieldInfo("TblTrainingTypeEntity", "TrainingTypeId", typeof(System.String), true, false, false, false, (int)TblTrainingTypeFieldIndex.TrainingTypeId, 2, 0, 0);
this.AddElementFieldInfo("TblTrainingTypeEntity", "TrainingTypeName", typeof(System.String), false, false, false, true, (int)TblTrainingTypeFieldIndex.TrainingTypeName, 255, 0, 0);
}
}
}

View File

@@ -0,0 +1,30 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.Runtime.Serialization;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>Helper class which will eases the creation of custom made resultsets. Usable in typed lists and dynamic lists created using the dynamic query engine.</summary>
[Serializable]
public partial class ResultsetFields : EntityFields2
{
/// <summary>CTor</summary>
public ResultsetFields(int amountFields) : base(amountFields, ModelInfoProviderSingleton.GetInstance(), null) { }
/// <summary>Deserialization constructor</summary>
/// <param name="info">Info.</param>
/// <param name="context">Context.</param>
protected ResultsetFields(SerializationInfo info, StreamingContext context) : base(info.GetInt32("_amountFields"), ModelInfoProviderSingleton.GetInstance(), null)
{
PerformDeserializationInitialization(info);
}
}
}

View File

@@ -0,0 +1,100 @@
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>Class for the returning of a default value when a type is given. These Default values are used for EntityFields which have a NULL value in the database.</summary>
[Serializable]
public partial class TypeDefaultValue : ITypeDefaultValue
{
/// <summary>Returns a default value for the type specified</summary>
/// <param name="defaultValueType">The type which default value should be returned.</param>
/// <returns>The default value for the type specified.</returns>
public object DefaultValue(System.Type defaultValueType) { return TypeDefaultValue.GetDefaultValue(defaultValueType); }
/// <summary>Returns a default value for the type specified</summary>
/// <param name="defaultValueType">The type which default value should be returned.</param>
/// <returns>The default value for the type specified.</returns>
public static object GetDefaultValue(System.Type defaultValueType)
{
object valueToReturn=null;
switch(Type.GetTypeCode(defaultValueType))
{
case TypeCode.String:
valueToReturn=string.Empty;
break;
case TypeCode.Boolean:
valueToReturn = false;
break;
case TypeCode.Byte:
valueToReturn = (byte)0;
break;
case TypeCode.DateTime:
valueToReturn = DateTime.MinValue;
break;
case TypeCode.Decimal:
valueToReturn = 0.0M;
break;
case TypeCode.Double:
valueToReturn = 0.0;
break;
case TypeCode.Int16:
valueToReturn = (short)0;
break;
case TypeCode.Int32:
valueToReturn = (int)0;
break;
case TypeCode.Int64:
valueToReturn = (long)0;
break;
case TypeCode.Object:
switch(defaultValueType.UnderlyingSystemType.FullName)
{
case "System.Guid":
valueToReturn = Guid.Empty;
break;
case "System.Byte[]":
valueToReturn = new byte[0];
break;
case "System.DateTimeOffset":
valueToReturn = DateTimeOffset.MinValue;
break;
case "System.TimeSpan":
valueToReturn = TimeSpan.MinValue;
break;
}
break;
case TypeCode.Single:
valueToReturn = 0.0f;
break;
case TypeCode.UInt16:
valueToReturn = (ushort)0;
break;
case TypeCode.UInt32:
valueToReturn = (uint)0;
break;
case TypeCode.UInt64:
valueToReturn = (ulong)0;
break;
case TypeCode.SByte:
valueToReturn = (SByte)0;
break;
default:
// do nothing, return null.
break;
}
return valueToReturn;
}
}
}