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,101 @@
//////////////////////////////////////////////////////////////
// <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.HelperClasses;
using Datalib.FactoryClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using System.Runtime.Serialization;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Common base class which is the base class for all generated entities which aren't a subtype of another entity.</summary>
[Serializable]
public abstract partial class CommonEntityBase : EntityBase2
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>CTor</summary>
protected CommonEntityBase() {}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected CommonEntityBase(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates the entity collection and stores it in destination if destination is null</summary>
/// <typeparam name="T">type of the element to store in the collection</typeparam>
/// <typeparam name="TFactory">The type of the factory to pass to the entitycollection ctor.</typeparam>
/// <param name="navigatorName">Name of the property this collection is for.</param>
/// <param name="setContainingEntityInfo">if set to <see langword="true"/> the collection is for an 1:n relationship, and the containing entity info has to be set</param>
/// <param name="forMN">if set to <see langword="true"/> the collection is for an m:n relationship, otherwise for an 1:n relationship</param>
/// <param name="destination">The destination member variable.</param>
/// <returns>the collection referred to by destination if destination isn't null, otherwise the newly created collection (which is then stored in destination</returns>
protected EntityCollection<T> GetOrCreateEntityCollection<T, TFactory>(string navigatorName, bool setContainingEntityInfo, bool forMN, ref EntityCollection<T> destination)
where T:EntityBase2, IEntity2
{
if(destination==null)
{
destination = new EntityCollection<T>(EntityFactoryCache2.GetEntityFactory(typeof(TFactory)));
if(forMN)
{
((IEntityCollectionCore)destination).IsForMN = true;
}
else
{
if(setContainingEntityInfo)
{
destination.SetContainingEntityInfo(this, navigatorName);
}
}
destination.ActiveContext = this.ActiveContext;
}
return destination;
}
/// <inheritdoc/>
protected override IInheritanceInfoProvider GetInheritanceInfoProvider() { return ModelInfoProviderSingleton.GetInstance(); }
/// <inheritdoc/>
protected override ITypeDefaultValue CreateTypeDefaultValueProvider() { return new TypeDefaultValue(); }
/// <inheritdoc/>
protected override IEntityCollection2 CreateEntityCollectionForType<T>() { return CommonEntityBase.CreateEntityCollection<T>(); }
/// <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)));
}
/// <inheritdoc/>
protected override Type LLBLGenProEntityTypeEnumType
{
get { return typeof(Datalib.EntityType); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}

View File

@@ -0,0 +1,249 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblField'.<br/><br/></summary>
[Serializable]
public partial class TblFieldEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private TblSubjectEntity _tblSubject;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblFieldEntityStaticMetaData _staticMetaData = new TblFieldEntityStaticMetaData();
private static TblFieldRelations _relationsFactory = new TblFieldRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblSubject</summary>
public static readonly string TblSubject = "TblSubject";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblFieldEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblFieldEntityStaticMetaData()
{
SetEntityCoreInfo("TblFieldEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblFieldEntity, typeof(TblFieldEntity), typeof(TblFieldEntityFactory), false);
AddNavigatorMetaData<TblFieldEntity, TblSubjectEntity>("TblSubject", "TblFields", (a, b) => a._tblSubject = b, a => a._tblSubject, (a, b) => a.TblSubject = b, Datalib.RelationClasses.StaticTblFieldRelations.TblSubjectEntityUsingSubjectIdStatic, ()=>new TblFieldRelations().TblSubjectEntityUsingSubjectId, null, new int[] { (int)TblFieldFieldIndex.SubjectId }, null, true, (int)Datalib.EntityType.TblSubjectEntity);
}
}
/// <summary>Static ctor</summary>
static TblFieldEntity()
{
}
/// <summary> CTor</summary>
public TblFieldEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblFieldEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblFieldEntity</param>
public TblFieldEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblField which data should be fetched into this TblField object</param>
public TblFieldEntity(System.String uniqueId) : this(uniqueId, null)
{
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblField which data should be fetched into this TblField object</param>
/// <param name="validator">The custom validator object for this TblFieldEntity</param>
public TblFieldEntity(System.String uniqueId, IValidator validator)
{
InitClassEmpty(validator, null);
this.UniqueId = uniqueId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblFieldEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblSubject' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblSubject() { return CreateRelationInfoForNavigator("TblSubject"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblFieldEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblFieldRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblSubject' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblSubject { get { return _staticMetaData.GetPrefetchPathElement("TblSubject", CommonEntityBase.CreateEntityCollection<TblSubjectEntity>()); } }
/// <summary>The Description property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."Description".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Description
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.Description, true); }
set { SetValue((int)TblFieldFieldIndex.Description, value); }
}
/// <summary>The FieldId property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."FieldID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FieldId
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.FieldId, true); }
set { SetValue((int)TblFieldFieldIndex.FieldId, value); }
}
/// <summary>The FieldName property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."FieldName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 50.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FieldName
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.FieldName, true); }
set { SetValue((int)TblFieldFieldIndex.FieldName, value); }
}
/// <summary>The Prefix property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."Prefix".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Prefix
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.Prefix, true); }
set { SetValue((int)TblFieldFieldIndex.Prefix, value); }
}
/// <summary>The SubjectId property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."SubjectID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String SubjectId
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.SubjectId, true); }
set { SetValue((int)TblFieldFieldIndex.SubjectId, value); }
}
/// <summary>The UniqueId property of the Entity TblField<br/><br/></summary>
/// <remarks>Mapped on table field: "tblFields"."UniqueID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueId
{
get { return (System.String)GetValue((int)TblFieldFieldIndex.UniqueId, true); }
set { SetValue((int)TblFieldFieldIndex.UniqueId, value); }
}
/// <summary>Gets / sets related entity of type 'TblSubjectEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblSubjectEntity TblSubject
{
get { return _tblSubject; }
set { SetSingleRelatedEntityNavigator(value, "TblSubject"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblFieldFieldIndex
{
///<summary>Description. </summary>
Description,
///<summary>FieldId. </summary>
FieldId,
///<summary>FieldName. </summary>
FieldName,
///<summary>Prefix. </summary>
Prefix,
///<summary>SubjectId. </summary>
SubjectId,
///<summary>UniqueId. </summary>
UniqueId,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblField. </summary>
public partial class TblFieldRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblFieldEntity and TblSubjectEntity over the m:1 relation they have, using the relation between the fields: TblField.SubjectId - TblSubject.SubjectId</summary>
public virtual IEntityRelation TblSubjectEntityUsingSubjectId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblSubject", false, new[] { TblSubjectFields.SubjectId, TblFieldFields.SubjectId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblFieldRelations
{
internal static readonly IEntityRelation TblSubjectEntityUsingSubjectIdStatic = new TblFieldRelations().TblSubjectEntityUsingSubjectId;
/// <summary>CTor</summary>
static StaticTblFieldRelations() { }
}
}

View File

@@ -0,0 +1,331 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblQuestion'.<br/><br/></summary>
[Serializable]
public partial class TblQuestionEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<TblQuizQuestionEntity> _tblQuizQuestions;
private TblSubjectEntity _tblSubject;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblQuestionEntityStaticMetaData _staticMetaData = new TblQuestionEntityStaticMetaData();
private static TblQuestionRelations _relationsFactory = new TblQuestionRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblSubject</summary>
public static readonly string TblSubject = "TblSubject";
/// <summary>Member name TblQuizQuestions</summary>
public static readonly string TblQuizQuestions = "TblQuizQuestions";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblQuestionEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblQuestionEntityStaticMetaData()
{
SetEntityCoreInfo("TblQuestionEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuestionEntity, typeof(TblQuestionEntity), typeof(TblQuestionEntityFactory), false);
AddNavigatorMetaData<TblQuestionEntity, EntityCollection<TblQuizQuestionEntity>>("TblQuizQuestions", a => a._tblQuizQuestions, (a, b) => a._tblQuizQuestions = b, a => a.TblQuizQuestions, () => new TblQuestionRelations().TblQuizQuestionEntityUsingQuestionId, typeof(TblQuizQuestionEntity), (int)Datalib.EntityType.TblQuizQuestionEntity);
AddNavigatorMetaData<TblQuestionEntity, TblSubjectEntity>("TblSubject", "TblQuestions", (a, b) => a._tblSubject = b, a => a._tblSubject, (a, b) => a.TblSubject = b, Datalib.RelationClasses.StaticTblQuestionRelations.TblSubjectEntityUsingSubjectIdStatic, ()=>new TblQuestionRelations().TblSubjectEntityUsingSubjectId, null, new int[] { (int)TblQuestionFieldIndex.SubjectId }, null, true, (int)Datalib.EntityType.TblSubjectEntity);
}
}
/// <summary>Static ctor</summary>
static TblQuestionEntity()
{
}
/// <summary> CTor</summary>
public TblQuestionEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblQuestionEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblQuestionEntity</param>
public TblQuestionEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="questionId">PK value for TblQuestion which data should be fetched into this TblQuestion object</param>
public TblQuestionEntity(System.String questionId) : this(questionId, null)
{
}
/// <summary> CTor</summary>
/// <param name="questionId">PK value for TblQuestion which data should be fetched into this TblQuestion object</param>
/// <param name="validator">The custom validator object for this TblQuestionEntity</param>
public TblQuestionEntity(System.String questionId, IValidator validator)
{
InitClassEmpty(validator, null);
this.QuestionId = questionId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblQuestionEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuizQuestion' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizQuestions() { return CreateRelationInfoForNavigator("TblQuizQuestions"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblSubject' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblSubject() { return CreateRelationInfoForNavigator("TblSubject"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblQuestionEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblQuestionRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizQuestion' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizQuestions { get { return _staticMetaData.GetPrefetchPathElement("TblQuizQuestions", CommonEntityBase.CreateEntityCollection<TblQuizQuestionEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblSubject' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblSubject { get { return _staticMetaData.GetPrefetchPathElement("TblSubject", CommonEntityBase.CreateEntityCollection<TblSubjectEntity>()); } }
/// <summary>The Answer property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Answer".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Answer
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Answer, true); }
set { SetValue((int)TblQuestionFieldIndex.Answer, value); }
}
/// <summary>The Content property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Content".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Content
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Content, true); }
set { SetValue((int)TblQuestionFieldIndex.Content, value); }
}
/// <summary>The CreateDate property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."CreateDate".<br/>Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> CreateDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblQuestionFieldIndex.CreateDate, false); }
set { SetValue((int)TblQuestionFieldIndex.CreateDate, value); }
}
/// <summary>The Difficulty property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Difficulty".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Difficulty
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Difficulty, true); }
set { SetValue((int)TblQuestionFieldIndex.Difficulty, value); }
}
/// <summary>The Exclusive property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Exclusive".<br/>Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Boolean Exclusive
{
get { return (System.Boolean)GetValue((int)TblQuestionFieldIndex.Exclusive, true); }
set { SetValue((int)TblQuestionFieldIndex.Exclusive, value); }
}
/// <summary>The Explaination property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Explaination".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Explaination
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Explaination, true); }
set { SetValue((int)TblQuestionFieldIndex.Explaination, value); }
}
/// <summary>The FieldId property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."FieldID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FieldId
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.FieldId, true); }
set { SetValue((int)TblQuestionFieldIndex.FieldId, value); }
}
/// <summary>The Level property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Level".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Level
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Level, true); }
set { SetValue((int)TblQuestionFieldIndex.Level, value); }
}
/// <summary>The QuestionCode property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."QuestionCode".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 10.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuestionCode
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.QuestionCode, true); }
set { SetValue((int)TblQuestionFieldIndex.QuestionCode, value); }
}
/// <summary>The QuestionId property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."QuestionID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String QuestionId
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.QuestionId, true); }
set { SetValue((int)TblQuestionFieldIndex.QuestionId, value); }
}
/// <summary>The SubjectId property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."SubjectID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String SubjectId
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.SubjectId, true); }
set { SetValue((int)TblQuestionFieldIndex.SubjectId, value); }
}
/// <summary>The Summary property of the Entity TblQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuestions"."Summary".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Summary
{
get { return (System.String)GetValue((int)TblQuestionFieldIndex.Summary, true); }
set { SetValue((int)TblQuestionFieldIndex.Summary, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizQuestionEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuizQuestionEntity))]
public virtual EntityCollection<TblQuizQuestionEntity> TblQuizQuestions { get { return GetOrCreateEntityCollection<TblQuizQuestionEntity, TblQuizQuestionEntityFactory>("TblQuestion", true, false, ref _tblQuizQuestions); } }
/// <summary>Gets / sets related entity of type 'TblSubjectEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblSubjectEntity TblSubject
{
get { return _tblSubject; }
set { SetSingleRelatedEntityNavigator(value, "TblSubject"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblQuestionFieldIndex
{
///<summary>Answer. </summary>
Answer,
///<summary>Content. </summary>
Content,
///<summary>CreateDate. </summary>
CreateDate,
///<summary>Difficulty. </summary>
Difficulty,
///<summary>Exclusive. </summary>
Exclusive,
///<summary>Explaination. </summary>
Explaination,
///<summary>FieldId. </summary>
FieldId,
///<summary>Level. </summary>
Level,
///<summary>QuestionCode. </summary>
QuestionCode,
///<summary>QuestionId. </summary>
QuestionId,
///<summary>SubjectId. </summary>
SubjectId,
///<summary>Summary. </summary>
Summary,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblQuestion. </summary>
public partial class TblQuestionRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblQuestionEntity and TblQuizQuestionEntity over the 1:n relation they have, using the relation between the fields: TblQuestion.QuestionId - TblQuizQuestion.QuestionId</summary>
public virtual IEntityRelation TblQuizQuestionEntityUsingQuestionId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizQuestions", true, new[] { TblQuestionFields.QuestionId, TblQuizQuestionFields.QuestionId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblQuestionEntity and TblSubjectEntity over the m:1 relation they have, using the relation between the fields: TblQuestion.SubjectId - TblSubject.SubjectId</summary>
public virtual IEntityRelation TblSubjectEntityUsingSubjectId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblSubject", false, new[] { TblSubjectFields.SubjectId, TblQuestionFields.SubjectId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblQuestionRelations
{
internal static readonly IEntityRelation TblQuizQuestionEntityUsingQuestionIdStatic = new TblQuestionRelations().TblQuizQuestionEntityUsingQuestionId;
internal static readonly IEntityRelation TblSubjectEntityUsingSubjectIdStatic = new TblQuestionRelations().TblSubjectEntityUsingSubjectId;
/// <summary>CTor</summary>
static StaticTblQuestionRelations() { }
}
}

View File

@@ -0,0 +1,271 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblQuiz'.<br/><br/></summary>
[Serializable]
public partial class TblQuizEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<TblQuizQuestionEntity> _tblQuizQuestions;
private TblQuizTemplateEntity _tblQuizTemplate;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblQuizEntityStaticMetaData _staticMetaData = new TblQuizEntityStaticMetaData();
private static TblQuizRelations _relationsFactory = new TblQuizRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblQuizTemplate</summary>
public static readonly string TblQuizTemplate = "TblQuizTemplate";
/// <summary>Member name TblQuizQuestions</summary>
public static readonly string TblQuizQuestions = "TblQuizQuestions";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblQuizEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblQuizEntityStaticMetaData()
{
SetEntityCoreInfo("TblQuizEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuizEntity, typeof(TblQuizEntity), typeof(TblQuizEntityFactory), false);
AddNavigatorMetaData<TblQuizEntity, EntityCollection<TblQuizQuestionEntity>>("TblQuizQuestions", a => a._tblQuizQuestions, (a, b) => a._tblQuizQuestions = b, a => a.TblQuizQuestions, () => new TblQuizRelations().TblQuizQuestionEntityUsingQuizId, typeof(TblQuizQuestionEntity), (int)Datalib.EntityType.TblQuizQuestionEntity);
AddNavigatorMetaData<TblQuizEntity, TblQuizTemplateEntity>("TblQuizTemplate", "TblQuizzes", (a, b) => a._tblQuizTemplate = b, a => a._tblQuizTemplate, (a, b) => a.TblQuizTemplate = b, Datalib.RelationClasses.StaticTblQuizRelations.TblQuizTemplateEntityUsingQuizTemplateIdStatic, ()=>new TblQuizRelations().TblQuizTemplateEntityUsingQuizTemplateId, null, new int[] { (int)TblQuizFieldIndex.QuizTemplateId }, null, true, (int)Datalib.EntityType.TblQuizTemplateEntity);
}
}
/// <summary>Static ctor</summary>
static TblQuizEntity()
{
}
/// <summary> CTor</summary>
public TblQuizEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblQuizEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblQuizEntity</param>
public TblQuizEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="quizId">PK value for TblQuiz which data should be fetched into this TblQuiz object</param>
public TblQuizEntity(System.String quizId) : this(quizId, null)
{
}
/// <summary> CTor</summary>
/// <param name="quizId">PK value for TblQuiz which data should be fetched into this TblQuiz object</param>
/// <param name="validator">The custom validator object for this TblQuizEntity</param>
public TblQuizEntity(System.String quizId, IValidator validator)
{
InitClassEmpty(validator, null);
this.QuizId = quizId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblQuizEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuizQuestion' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizQuestions() { return CreateRelationInfoForNavigator("TblQuizQuestions"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblQuizTemplate' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizTemplate() { return CreateRelationInfoForNavigator("TblQuizTemplate"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblQuizEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblQuizRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizQuestion' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizQuestions { get { return _staticMetaData.GetPrefetchPathElement("TblQuizQuestions", CommonEntityBase.CreateEntityCollection<TblQuizQuestionEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizTemplate' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizTemplate { get { return _staticMetaData.GetPrefetchPathElement("TblQuizTemplate", CommonEntityBase.CreateEntityCollection<TblQuizTemplateEntity>()); } }
/// <summary>The QuizCode property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizCode".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuizCode
{
get { return (System.String)GetValue((int)TblQuizFieldIndex.QuizCode, true); }
set { SetValue((int)TblQuizFieldIndex.QuizCode, value); }
}
/// <summary>The QuizId property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String QuizId
{
get { return (System.String)GetValue((int)TblQuizFieldIndex.QuizId, true); }
set { SetValue((int)TblQuizFieldIndex.QuizId, value); }
}
/// <summary>The QuizName property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuizName
{
get { return (System.String)GetValue((int)TblQuizFieldIndex.QuizName, true); }
set { SetValue((int)TblQuizFieldIndex.QuizName, value); }
}
/// <summary>The QuizTemplateId property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizTemplateID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuizTemplateId
{
get { return (System.String)GetValue((int)TblQuizFieldIndex.QuizTemplateId, true); }
set { SetValue((int)TblQuizFieldIndex.QuizTemplateId, value); }
}
/// <summary>The QuizTime property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizTime".<br/>Table field type characteristics (type, precision, scale, length): Integer, 10, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int32> QuizTime
{
get { return (Nullable<System.Int32>)GetValue((int)TblQuizFieldIndex.QuizTime, false); }
set { SetValue((int)TblQuizFieldIndex.QuizTime, value); }
}
/// <summary>The QuizYear property of the Entity TblQuiz<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizs"."QuizYear".<br/>Table field type characteristics (type, precision, scale, length): Integer, 10, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int32> QuizYear
{
get { return (Nullable<System.Int32>)GetValue((int)TblQuizFieldIndex.QuizYear, false); }
set { SetValue((int)TblQuizFieldIndex.QuizYear, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizQuestionEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuizQuestionEntity))]
public virtual EntityCollection<TblQuizQuestionEntity> TblQuizQuestions { get { return GetOrCreateEntityCollection<TblQuizQuestionEntity, TblQuizQuestionEntityFactory>("TblQuiz", true, false, ref _tblQuizQuestions); } }
/// <summary>Gets / sets related entity of type 'TblQuizTemplateEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblQuizTemplateEntity TblQuizTemplate
{
get { return _tblQuizTemplate; }
set { SetSingleRelatedEntityNavigator(value, "TblQuizTemplate"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblQuizFieldIndex
{
///<summary>QuizCode. </summary>
QuizCode,
///<summary>QuizId. </summary>
QuizId,
///<summary>QuizName. </summary>
QuizName,
///<summary>QuizTemplateId. </summary>
QuizTemplateId,
///<summary>QuizTime. </summary>
QuizTime,
///<summary>QuizYear. </summary>
QuizYear,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblQuiz. </summary>
public partial class TblQuizRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblQuizEntity and TblQuizQuestionEntity over the 1:n relation they have, using the relation between the fields: TblQuiz.QuizId - TblQuizQuestion.QuizId</summary>
public virtual IEntityRelation TblQuizQuestionEntityUsingQuizId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizQuestions", true, new[] { TblQuizFields.QuizId, TblQuizQuestionFields.QuizId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblQuizEntity and TblQuizTemplateEntity over the m:1 relation they have, using the relation between the fields: TblQuiz.QuizTemplateId - TblQuizTemplate.QuizTemplateId</summary>
public virtual IEntityRelation TblQuizTemplateEntityUsingQuizTemplateId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblQuizTemplate", false, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizFields.QuizTemplateId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblQuizRelations
{
internal static readonly IEntityRelation TblQuizQuestionEntityUsingQuizIdStatic = new TblQuizRelations().TblQuizQuestionEntityUsingQuizId;
internal static readonly IEntityRelation TblQuizTemplateEntityUsingQuizTemplateIdStatic = new TblQuizRelations().TblQuizTemplateEntityUsingQuizTemplateId;
/// <summary>CTor</summary>
static StaticTblQuizRelations() { }
}
}

View File

@@ -0,0 +1,266 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblQuizQuestion'.<br/><br/></summary>
[Serializable]
public partial class TblQuizQuestionEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private TblQuestionEntity _tblQuestion;
private TblQuizEntity _tblQuiz;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblQuizQuestionEntityStaticMetaData _staticMetaData = new TblQuizQuestionEntityStaticMetaData();
private static TblQuizQuestionRelations _relationsFactory = new TblQuizQuestionRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblQuestion</summary>
public static readonly string TblQuestion = "TblQuestion";
/// <summary>Member name TblQuiz</summary>
public static readonly string TblQuiz = "TblQuiz";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblQuizQuestionEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblQuizQuestionEntityStaticMetaData()
{
SetEntityCoreInfo("TblQuizQuestionEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuizQuestionEntity, typeof(TblQuizQuestionEntity), typeof(TblQuizQuestionEntityFactory), false);
AddNavigatorMetaData<TblQuizQuestionEntity, TblQuestionEntity>("TblQuestion", "TblQuizQuestions", (a, b) => a._tblQuestion = b, a => a._tblQuestion, (a, b) => a.TblQuestion = b, Datalib.RelationClasses.StaticTblQuizQuestionRelations.TblQuestionEntityUsingQuestionIdStatic, ()=>new TblQuizQuestionRelations().TblQuestionEntityUsingQuestionId, null, new int[] { (int)TblQuizQuestionFieldIndex.QuestionId }, null, true, (int)Datalib.EntityType.TblQuestionEntity);
AddNavigatorMetaData<TblQuizQuestionEntity, TblQuizEntity>("TblQuiz", "TblQuizQuestions", (a, b) => a._tblQuiz = b, a => a._tblQuiz, (a, b) => a.TblQuiz = b, Datalib.RelationClasses.StaticTblQuizQuestionRelations.TblQuizEntityUsingQuizIdStatic, ()=>new TblQuizQuestionRelations().TblQuizEntityUsingQuizId, null, new int[] { (int)TblQuizQuestionFieldIndex.QuizId }, null, true, (int)Datalib.EntityType.TblQuizEntity);
}
}
/// <summary>Static ctor</summary>
static TblQuizQuestionEntity()
{
}
/// <summary> CTor</summary>
public TblQuizQuestionEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblQuizQuestionEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblQuizQuestionEntity</param>
public TblQuizQuestionEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblQuizQuestion which data should be fetched into this TblQuizQuestion object</param>
public TblQuizQuestionEntity(System.String uniqueId) : this(uniqueId, null)
{
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblQuizQuestion which data should be fetched into this TblQuizQuestion object</param>
/// <param name="validator">The custom validator object for this TblQuizQuestionEntity</param>
public TblQuizQuestionEntity(System.String uniqueId, IValidator validator)
{
InitClassEmpty(validator, null);
this.UniqueId = uniqueId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblQuizQuestionEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblQuestion' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuestion() { return CreateRelationInfoForNavigator("TblQuestion"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblQuiz' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuiz() { return CreateRelationInfoForNavigator("TblQuiz"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblQuizQuestionEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblQuizQuestionRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuestion' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuestion { get { return _staticMetaData.GetPrefetchPathElement("TblQuestion", CommonEntityBase.CreateEntityCollection<TblQuestionEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuiz' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuiz { get { return _staticMetaData.GetPrefetchPathElement("TblQuiz", CommonEntityBase.CreateEntityCollection<TblQuizEntity>()); } }
/// <summary>The QuestionId property of the Entity TblQuizQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizQuestions"."QuestionID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuestionId
{
get { return (System.String)GetValue((int)TblQuizQuestionFieldIndex.QuestionId, true); }
set { SetValue((int)TblQuizQuestionFieldIndex.QuestionId, value); }
}
/// <summary>The QuizId property of the Entity TblQuizQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizQuestions"."QuizID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String QuizId
{
get { return (System.String)GetValue((int)TblQuizQuestionFieldIndex.QuizId, true); }
set { SetValue((int)TblQuizQuestionFieldIndex.QuizId, value); }
}
/// <summary>The QuizTemplateId property of the Entity TblQuizQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizQuestions"."QuizTemplateID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String QuizTemplateId
{
get { return (System.String)GetValue((int)TblQuizQuestionFieldIndex.QuizTemplateId, true); }
set { SetValue((int)TblQuizQuestionFieldIndex.QuizTemplateId, value); }
}
/// <summary>The TrainingTypeId property of the Entity TblQuizQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizQuestions"."TrainingTypeID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String TrainingTypeId
{
get { return (System.String)GetValue((int)TblQuizQuestionFieldIndex.TrainingTypeId, true); }
set { SetValue((int)TblQuizQuestionFieldIndex.TrainingTypeId, value); }
}
/// <summary>The UniqueId property of the Entity TblQuizQuestion<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizQuestions"."UniqueID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueId
{
get { return (System.String)GetValue((int)TblQuizQuestionFieldIndex.UniqueId, true); }
set { SetValue((int)TblQuizQuestionFieldIndex.UniqueId, value); }
}
/// <summary>Gets / sets related entity of type 'TblQuestionEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblQuestionEntity TblQuestion
{
get { return _tblQuestion; }
set { SetSingleRelatedEntityNavigator(value, "TblQuestion"); }
}
/// <summary>Gets / sets related entity of type 'TblQuizEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblQuizEntity TblQuiz
{
get { return _tblQuiz; }
set { SetSingleRelatedEntityNavigator(value, "TblQuiz"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblQuizQuestionFieldIndex
{
///<summary>QuestionId. </summary>
QuestionId,
///<summary>QuizId. </summary>
QuizId,
///<summary>QuizTemplateId. </summary>
QuizTemplateId,
///<summary>TrainingTypeId. </summary>
TrainingTypeId,
///<summary>UniqueId. </summary>
UniqueId,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblQuizQuestion. </summary>
public partial class TblQuizQuestionRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblQuizQuestionEntity and TblQuestionEntity over the m:1 relation they have, using the relation between the fields: TblQuizQuestion.QuestionId - TblQuestion.QuestionId</summary>
public virtual IEntityRelation TblQuestionEntityUsingQuestionId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblQuestion", false, new[] { TblQuestionFields.QuestionId, TblQuizQuestionFields.QuestionId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblQuizQuestionEntity and TblQuizEntity over the m:1 relation they have, using the relation between the fields: TblQuizQuestion.QuizId - TblQuiz.QuizId</summary>
public virtual IEntityRelation TblQuizEntityUsingQuizId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblQuiz", false, new[] { TblQuizFields.QuizId, TblQuizQuestionFields.QuizId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblQuizQuestionRelations
{
internal static readonly IEntityRelation TblQuestionEntityUsingQuestionIdStatic = new TblQuizQuestionRelations().TblQuestionEntityUsingQuestionId;
internal static readonly IEntityRelation TblQuizEntityUsingQuizIdStatic = new TblQuizQuestionRelations().TblQuizEntityUsingQuizId;
/// <summary>CTor</summary>
static StaticTblQuizQuestionRelations() { }
}
}

View File

@@ -0,0 +1,259 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblQuizTemplateDetail'.<br/><br/></summary>
[Serializable]
public partial class TblQuizTemplateDetailEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private TblQuizTemplateEntity _tblQuizTemplate;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblQuizTemplateDetailEntityStaticMetaData _staticMetaData = new TblQuizTemplateDetailEntityStaticMetaData();
private static TblQuizTemplateDetailRelations _relationsFactory = new TblQuizTemplateDetailRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblQuizTemplate</summary>
public static readonly string TblQuizTemplate = "TblQuizTemplate";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblQuizTemplateDetailEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblQuizTemplateDetailEntityStaticMetaData()
{
SetEntityCoreInfo("TblQuizTemplateDetailEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuizTemplateDetailEntity, typeof(TblQuizTemplateDetailEntity), typeof(TblQuizTemplateDetailEntityFactory), false);
AddNavigatorMetaData<TblQuizTemplateDetailEntity, TblQuizTemplateEntity>("TblQuizTemplate", "TblQuizTemplateDetails", (a, b) => a._tblQuizTemplate = b, a => a._tblQuizTemplate, (a, b) => a.TblQuizTemplate = b, Datalib.RelationClasses.StaticTblQuizTemplateDetailRelations.TblQuizTemplateEntityUsingQuizTemplateIdStatic, ()=>new TblQuizTemplateDetailRelations().TblQuizTemplateEntityUsingQuizTemplateId, null, new int[] { (int)TblQuizTemplateDetailFieldIndex.QuizTemplateId }, null, true, (int)Datalib.EntityType.TblQuizTemplateEntity);
}
}
/// <summary>Static ctor</summary>
static TblQuizTemplateDetailEntity()
{
}
/// <summary> CTor</summary>
public TblQuizTemplateDetailEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblQuizTemplateDetailEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblQuizTemplateDetailEntity</param>
public TblQuizTemplateDetailEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblQuizTemplateDetail which data should be fetched into this TblQuizTemplateDetail object</param>
public TblQuizTemplateDetailEntity(System.String uniqueId) : this(uniqueId, null)
{
}
/// <summary> CTor</summary>
/// <param name="uniqueId">PK value for TblQuizTemplateDetail which data should be fetched into this TblQuizTemplateDetail object</param>
/// <param name="validator">The custom validator object for this TblQuizTemplateDetailEntity</param>
public TblQuizTemplateDetailEntity(System.String uniqueId, IValidator validator)
{
InitClassEmpty(validator, null);
this.UniqueId = uniqueId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblQuizTemplateDetailEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblQuizTemplate' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizTemplate() { return CreateRelationInfoForNavigator("TblQuizTemplate"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblQuizTemplateDetailEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblQuizTemplateDetailRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizTemplate' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizTemplate { get { return _staticMetaData.GetPrefetchPathElement("TblQuizTemplate", CommonEntityBase.CreateEntityCollection<TblQuizTemplateEntity>()); } }
/// <summary>The Difficulty property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."Difficulty".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Difficulty
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.Difficulty, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.Difficulty, value); }
}
/// <summary>The FieldId property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."FieldID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FieldId
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.FieldId, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.FieldId, value); }
}
/// <summary>The Level property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."Level".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Level
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.Level, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.Level, value); }
}
/// <summary>The QuestionNum property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."QuestionNum".<br/>Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> QuestionNum
{
get { return (Nullable<System.Int16>)GetValue((int)TblQuizTemplateDetailFieldIndex.QuestionNum, false); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.QuestionNum, value); }
}
/// <summary>The QuizTemplateId property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."QuizTemplateID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuizTemplateId
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.QuizTemplateId, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.QuizTemplateId, value); }
}
/// <summary>The SubjectId property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."SubjectID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String SubjectId
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.SubjectId, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.SubjectId, value); }
}
/// <summary>The UniqueId property of the Entity TblQuizTemplateDetail<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplateDetail"."UniqueID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueId
{
get { return (System.String)GetValue((int)TblQuizTemplateDetailFieldIndex.UniqueId, true); }
set { SetValue((int)TblQuizTemplateDetailFieldIndex.UniqueId, value); }
}
/// <summary>Gets / sets related entity of type 'TblQuizTemplateEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblQuizTemplateEntity TblQuizTemplate
{
get { return _tblQuizTemplate; }
set { SetSingleRelatedEntityNavigator(value, "TblQuizTemplate"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblQuizTemplateDetailFieldIndex
{
///<summary>Difficulty. </summary>
Difficulty,
///<summary>FieldId. </summary>
FieldId,
///<summary>Level. </summary>
Level,
///<summary>QuestionNum. </summary>
QuestionNum,
///<summary>QuizTemplateId. </summary>
QuizTemplateId,
///<summary>SubjectId. </summary>
SubjectId,
///<summary>UniqueId. </summary>
UniqueId,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblQuizTemplateDetail. </summary>
public partial class TblQuizTemplateDetailRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateDetailEntity and TblQuizTemplateEntity over the m:1 relation they have, using the relation between the fields: TblQuizTemplateDetail.QuizTemplateId - TblQuizTemplate.QuizTemplateId</summary>
public virtual IEntityRelation TblQuizTemplateEntityUsingQuizTemplateId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblQuizTemplate", false, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizTemplateDetailFields.QuizTemplateId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblQuizTemplateDetailRelations
{
internal static readonly IEntityRelation TblQuizTemplateEntityUsingQuizTemplateIdStatic = new TblQuizTemplateDetailRelations().TblQuizTemplateEntityUsingQuizTemplateId;
/// <summary>CTor</summary>
static StaticTblQuizTemplateDetailRelations() { }
}
}

View File

@@ -0,0 +1,304 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblQuizTemplate'.<br/><br/></summary>
[Serializable]
public partial class TblQuizTemplateEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<TblQuizEntity> _tblQuizzes;
private EntityCollection<TblQuizTemplateDetailEntity> _tblQuizTemplateDetails;
private TblTrainingTypeEntity _tblTrainingType;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblQuizTemplateEntityStaticMetaData _staticMetaData = new TblQuizTemplateEntityStaticMetaData();
private static TblQuizTemplateRelations _relationsFactory = new TblQuizTemplateRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblTrainingType</summary>
public static readonly string TblTrainingType = "TblTrainingType";
/// <summary>Member name TblQuizzes</summary>
public static readonly string TblQuizzes = "TblQuizzes";
/// <summary>Member name TblQuizTemplateDetails</summary>
public static readonly string TblQuizTemplateDetails = "TblQuizTemplateDetails";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblQuizTemplateEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblQuizTemplateEntityStaticMetaData()
{
SetEntityCoreInfo("TblQuizTemplateEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuizTemplateEntity, typeof(TblQuizTemplateEntity), typeof(TblQuizTemplateEntityFactory), false);
AddNavigatorMetaData<TblQuizTemplateEntity, EntityCollection<TblQuizEntity>>("TblQuizzes", a => a._tblQuizzes, (a, b) => a._tblQuizzes = b, a => a.TblQuizzes, () => new TblQuizTemplateRelations().TblQuizEntityUsingQuizTemplateId, typeof(TblQuizEntity), (int)Datalib.EntityType.TblQuizEntity);
AddNavigatorMetaData<TblQuizTemplateEntity, EntityCollection<TblQuizTemplateDetailEntity>>("TblQuizTemplateDetails", a => a._tblQuizTemplateDetails, (a, b) => a._tblQuizTemplateDetails = b, a => a.TblQuizTemplateDetails, () => new TblQuizTemplateRelations().TblQuizTemplateDetailEntityUsingQuizTemplateId, typeof(TblQuizTemplateDetailEntity), (int)Datalib.EntityType.TblQuizTemplateDetailEntity);
AddNavigatorMetaData<TblQuizTemplateEntity, TblTrainingTypeEntity>("TblTrainingType", "TblQuizTemplates", (a, b) => a._tblTrainingType = b, a => a._tblTrainingType, (a, b) => a.TblTrainingType = b, Datalib.RelationClasses.StaticTblQuizTemplateRelations.TblTrainingTypeEntityUsingTrainingTypeIdStatic, ()=>new TblQuizTemplateRelations().TblTrainingTypeEntityUsingTrainingTypeId, null, new int[] { (int)TblQuizTemplateFieldIndex.TrainingTypeId }, null, true, (int)Datalib.EntityType.TblTrainingTypeEntity);
}
}
/// <summary>Static ctor</summary>
static TblQuizTemplateEntity()
{
}
/// <summary> CTor</summary>
public TblQuizTemplateEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblQuizTemplateEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblQuizTemplateEntity</param>
public TblQuizTemplateEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="quizTemplateId">PK value for TblQuizTemplate which data should be fetched into this TblQuizTemplate object</param>
public TblQuizTemplateEntity(System.String quizTemplateId) : this(quizTemplateId, null)
{
}
/// <summary> CTor</summary>
/// <param name="quizTemplateId">PK value for TblQuizTemplate which data should be fetched into this TblQuizTemplate object</param>
/// <param name="validator">The custom validator object for this TblQuizTemplateEntity</param>
public TblQuizTemplateEntity(System.String quizTemplateId, IValidator validator)
{
InitClassEmpty(validator, null);
this.QuizTemplateId = quizTemplateId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblQuizTemplateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuiz' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizzes() { return CreateRelationInfoForNavigator("TblQuizzes"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuizTemplateDetail' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizTemplateDetails() { return CreateRelationInfoForNavigator("TblQuizTemplateDetails"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblTrainingType' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTrainingType() { return CreateRelationInfoForNavigator("TblTrainingType"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblQuizTemplateEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblQuizTemplateRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuiz' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizzes { get { return _staticMetaData.GetPrefetchPathElement("TblQuizzes", CommonEntityBase.CreateEntityCollection<TblQuizEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizTemplateDetail' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizTemplateDetails { get { return _staticMetaData.GetPrefetchPathElement("TblQuizTemplateDetails", CommonEntityBase.CreateEntityCollection<TblQuizTemplateDetailEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTrainingType' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTrainingType { get { return _staticMetaData.GetPrefetchPathElement("TblTrainingType", CommonEntityBase.CreateEntityCollection<TblTrainingTypeEntity>()); } }
/// <summary>The FooterDes property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."FooterDes".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FooterDes
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.FooterDes, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.FooterDes, value); }
}
/// <summary>The HeaderDes property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."HeaderDes".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String HeaderDes
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.HeaderDes, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.HeaderDes, value); }
}
/// <summary>The QuizTemplateCode property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."QuizTemplateCode".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String QuizTemplateCode
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.QuizTemplateCode, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.QuizTemplateCode, value); }
}
/// <summary>The QuizTemplateId property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."QuizTemplateID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String QuizTemplateId
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.QuizTemplateId, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.QuizTemplateId, value); }
}
/// <summary>The Renumering property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."Renumering".<br/>Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Boolean Renumering
{
get { return (System.Boolean)GetValue((int)TblQuizTemplateFieldIndex.Renumering, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.Renumering, value); }
}
/// <summary>The TemplateQuizName property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."TemplateQuizName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TemplateQuizName
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.TemplateQuizName, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.TemplateQuizName, value); }
}
/// <summary>The TrainingTypeId property of the Entity TblQuizTemplate<br/><br/></summary>
/// <remarks>Mapped on table field: "tblQuizTemplate"."TrainingTypeID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String TrainingTypeId
{
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.TrainingTypeId, true); }
set { SetValue((int)TblQuizTemplateFieldIndex.TrainingTypeId, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuizEntity))]
public virtual EntityCollection<TblQuizEntity> TblQuizzes { get { return GetOrCreateEntityCollection<TblQuizEntity, TblQuizEntityFactory>("TblQuizTemplate", true, false, ref _tblQuizzes); } }
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizTemplateDetailEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuizTemplateDetailEntity))]
public virtual EntityCollection<TblQuizTemplateDetailEntity> TblQuizTemplateDetails { get { return GetOrCreateEntityCollection<TblQuizTemplateDetailEntity, TblQuizTemplateDetailEntityFactory>("TblQuizTemplate", true, false, ref _tblQuizTemplateDetails); } }
/// <summary>Gets / sets related entity of type 'TblTrainingTypeEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblTrainingTypeEntity TblTrainingType
{
get { return _tblTrainingType; }
set { SetSingleRelatedEntityNavigator(value, "TblTrainingType"); }
}
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblQuizTemplateFieldIndex
{
///<summary>FooterDes. </summary>
FooterDes,
///<summary>HeaderDes. </summary>
HeaderDes,
///<summary>QuizTemplateCode. </summary>
QuizTemplateCode,
///<summary>QuizTemplateId. </summary>
QuizTemplateId,
///<summary>Renumering. </summary>
Renumering,
///<summary>TemplateQuizName. </summary>
TemplateQuizName,
///<summary>TrainingTypeId. </summary>
TrainingTypeId,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblQuizTemplate. </summary>
public partial class TblQuizTemplateRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblQuizEntity over the 1:n relation they have, using the relation between the fields: TblQuizTemplate.QuizTemplateId - TblQuiz.QuizTemplateId</summary>
public virtual IEntityRelation TblQuizEntityUsingQuizTemplateId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizzes", true, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizFields.QuizTemplateId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblQuizTemplateDetailEntity over the 1:n relation they have, using the relation between the fields: TblQuizTemplate.QuizTemplateId - TblQuizTemplateDetail.QuizTemplateId</summary>
public virtual IEntityRelation TblQuizTemplateDetailEntityUsingQuizTemplateId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizTemplateDetails", true, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizTemplateDetailFields.QuizTemplateId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblTrainingTypeEntity over the m:1 relation they have, using the relation between the fields: TblQuizTemplate.TrainingTypeId - TblTrainingType.TrainingTypeId</summary>
public virtual IEntityRelation TblTrainingTypeEntityUsingTrainingTypeId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblTrainingType", false, new[] { TblTrainingTypeFields.TrainingTypeId, TblQuizTemplateFields.TrainingTypeId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblQuizTemplateRelations
{
internal static readonly IEntityRelation TblQuizEntityUsingQuizTemplateIdStatic = new TblQuizTemplateRelations().TblQuizEntityUsingQuizTemplateId;
internal static readonly IEntityRelation TblQuizTemplateDetailEntityUsingQuizTemplateIdStatic = new TblQuizTemplateRelations().TblQuizTemplateDetailEntityUsingQuizTemplateId;
internal static readonly IEntityRelation TblTrainingTypeEntityUsingTrainingTypeIdStatic = new TblQuizTemplateRelations().TblTrainingTypeEntityUsingTrainingTypeId;
/// <summary>CTor</summary>
static StaticTblQuizTemplateRelations() { }
}
}

View File

@@ -0,0 +1,237 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblSubject'.<br/><br/></summary>
[Serializable]
public partial class TblSubjectEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<TblFieldEntity> _tblFields;
private EntityCollection<TblQuestionEntity> _tblQuestions;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblSubjectEntityStaticMetaData _staticMetaData = new TblSubjectEntityStaticMetaData();
private static TblSubjectRelations _relationsFactory = new TblSubjectRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblFields</summary>
public static readonly string TblFields = "TblFields";
/// <summary>Member name TblQuestions</summary>
public static readonly string TblQuestions = "TblQuestions";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblSubjectEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblSubjectEntityStaticMetaData()
{
SetEntityCoreInfo("TblSubjectEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblSubjectEntity, typeof(TblSubjectEntity), typeof(TblSubjectEntityFactory), false);
AddNavigatorMetaData<TblSubjectEntity, EntityCollection<TblFieldEntity>>("TblFields", a => a._tblFields, (a, b) => a._tblFields = b, a => a.TblFields, () => new TblSubjectRelations().TblFieldEntityUsingSubjectId, typeof(TblFieldEntity), (int)Datalib.EntityType.TblFieldEntity);
AddNavigatorMetaData<TblSubjectEntity, EntityCollection<TblQuestionEntity>>("TblQuestions", a => a._tblQuestions, (a, b) => a._tblQuestions = b, a => a.TblQuestions, () => new TblSubjectRelations().TblQuestionEntityUsingSubjectId, typeof(TblQuestionEntity), (int)Datalib.EntityType.TblQuestionEntity);
}
}
/// <summary>Static ctor</summary>
static TblSubjectEntity()
{
}
/// <summary> CTor</summary>
public TblSubjectEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblSubjectEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblSubjectEntity</param>
public TblSubjectEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="subjectId">PK value for TblSubject which data should be fetched into this TblSubject object</param>
public TblSubjectEntity(System.String subjectId) : this(subjectId, null)
{
}
/// <summary> CTor</summary>
/// <param name="subjectId">PK value for TblSubject which data should be fetched into this TblSubject object</param>
/// <param name="validator">The custom validator object for this TblSubjectEntity</param>
public TblSubjectEntity(System.String subjectId, IValidator validator)
{
InitClassEmpty(validator, null);
this.SubjectId = subjectId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblSubjectEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblField' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblFields() { return CreateRelationInfoForNavigator("TblFields"); }
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuestion' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuestions() { return CreateRelationInfoForNavigator("TblQuestions"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblSubjectEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblSubjectRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblField' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblFields { get { return _staticMetaData.GetPrefetchPathElement("TblFields", CommonEntityBase.CreateEntityCollection<TblFieldEntity>()); } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuestion' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuestions { get { return _staticMetaData.GetPrefetchPathElement("TblQuestions", CommonEntityBase.CreateEntityCollection<TblQuestionEntity>()); } }
/// <summary>The SubjectDes property of the Entity TblSubject<br/><br/></summary>
/// <remarks>Mapped on table field: "tblSubjects"."SubjectDes".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String SubjectDes
{
get { return (System.String)GetValue((int)TblSubjectFieldIndex.SubjectDes, true); }
set { SetValue((int)TblSubjectFieldIndex.SubjectDes, value); }
}
/// <summary>The SubjectId property of the Entity TblSubject<br/><br/></summary>
/// <remarks>Mapped on table field: "tblSubjects"."SubjectID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String SubjectId
{
get { return (System.String)GetValue((int)TblSubjectFieldIndex.SubjectId, true); }
set { SetValue((int)TblSubjectFieldIndex.SubjectId, value); }
}
/// <summary>The SubjectName property of the Entity TblSubject<br/><br/></summary>
/// <remarks>Mapped on table field: "tblSubjects"."SubjectName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 50.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String SubjectName
{
get { return (System.String)GetValue((int)TblSubjectFieldIndex.SubjectName, true); }
set { SetValue((int)TblSubjectFieldIndex.SubjectName, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'TblFieldEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblFieldEntity))]
public virtual EntityCollection<TblFieldEntity> TblFields { get { return GetOrCreateEntityCollection<TblFieldEntity, TblFieldEntityFactory>("TblSubject", true, false, ref _tblFields); } }
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuestionEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuestionEntity))]
public virtual EntityCollection<TblQuestionEntity> TblQuestions { get { return GetOrCreateEntityCollection<TblQuestionEntity, TblQuestionEntityFactory>("TblSubject", true, false, ref _tblQuestions); } }
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblSubjectFieldIndex
{
///<summary>SubjectDes. </summary>
SubjectDes,
///<summary>SubjectId. </summary>
SubjectId,
///<summary>SubjectName. </summary>
SubjectName,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblSubject. </summary>
public partial class TblSubjectRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblSubjectEntity and TblFieldEntity over the 1:n relation they have, using the relation between the fields: TblSubject.SubjectId - TblField.SubjectId</summary>
public virtual IEntityRelation TblFieldEntityUsingSubjectId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblFields", true, new[] { TblSubjectFields.SubjectId, TblFieldFields.SubjectId }); }
}
/// <summary>Returns a new IEntityRelation object, between TblSubjectEntity and TblQuestionEntity over the 1:n relation they have, using the relation between the fields: TblSubject.SubjectId - TblQuestion.SubjectId</summary>
public virtual IEntityRelation TblQuestionEntityUsingSubjectId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuestions", true, new[] { TblSubjectFields.SubjectId, TblQuestionFields.SubjectId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblSubjectRelations
{
internal static readonly IEntityRelation TblFieldEntityUsingSubjectIdStatic = new TblSubjectRelations().TblFieldEntityUsingSubjectId;
internal static readonly IEntityRelation TblQuestionEntityUsingSubjectIdStatic = new TblSubjectRelations().TblQuestionEntityUsingSubjectId;
/// <summary>CTor</summary>
static StaticTblSubjectRelations() { }
}
}

View File

@@ -0,0 +1,204 @@
//////////////////////////////////////////////////////////////
// <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.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'TblTrainingType'.<br/><br/></summary>
[Serializable]
public partial class TblTrainingTypeEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<TblQuizTemplateEntity> _tblQuizTemplates;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static TblTrainingTypeEntityStaticMetaData _staticMetaData = new TblTrainingTypeEntityStaticMetaData();
private static TblTrainingTypeRelations _relationsFactory = new TblTrainingTypeRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblQuizTemplates</summary>
public static readonly string TblQuizTemplates = "TblQuizTemplates";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class TblTrainingTypeEntityStaticMetaData : EntityStaticMetaDataBase
{
public TblTrainingTypeEntityStaticMetaData()
{
SetEntityCoreInfo("TblTrainingTypeEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblTrainingTypeEntity, typeof(TblTrainingTypeEntity), typeof(TblTrainingTypeEntityFactory), false);
AddNavigatorMetaData<TblTrainingTypeEntity, EntityCollection<TblQuizTemplateEntity>>("TblQuizTemplates", a => a._tblQuizTemplates, (a, b) => a._tblQuizTemplates = b, a => a.TblQuizTemplates, () => new TblTrainingTypeRelations().TblQuizTemplateEntityUsingTrainingTypeId, typeof(TblQuizTemplateEntity), (int)Datalib.EntityType.TblQuizTemplateEntity);
}
}
/// <summary>Static ctor</summary>
static TblTrainingTypeEntity()
{
}
/// <summary> CTor</summary>
public TblTrainingTypeEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblTrainingTypeEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblTrainingTypeEntity</param>
public TblTrainingTypeEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="trainingTypeId">PK value for TblTrainingType which data should be fetched into this TblTrainingType object</param>
public TblTrainingTypeEntity(System.String trainingTypeId) : this(trainingTypeId, null)
{
}
/// <summary> CTor</summary>
/// <param name="trainingTypeId">PK value for TblTrainingType which data should be fetched into this TblTrainingType object</param>
/// <param name="validator">The custom validator object for this TblTrainingTypeEntity</param>
public TblTrainingTypeEntity(System.String trainingTypeId, IValidator validator)
{
InitClassEmpty(validator, null);
this.TrainingTypeId = trainingTypeId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblTrainingTypeEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuizTemplate' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblQuizTemplates() { return CreateRelationInfoForNavigator("TblQuizTemplates"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblTrainingTypeEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static TblTrainingTypeRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizTemplate' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblQuizTemplates { get { return _staticMetaData.GetPrefetchPathElement("TblQuizTemplates", CommonEntityBase.CreateEntityCollection<TblQuizTemplateEntity>()); } }
/// <summary>The TrainingTypeId property of the Entity TblTrainingType<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTrainingTypes"."TrainingTypeID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String TrainingTypeId
{
get { return (System.String)GetValue((int)TblTrainingTypeFieldIndex.TrainingTypeId, true); }
set { SetValue((int)TblTrainingTypeFieldIndex.TrainingTypeId, value); }
}
/// <summary>The TrainingTypeName property of the Entity TblTrainingType<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTrainingTypes"."TrainingTypeName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TrainingTypeName
{
get { return (System.String)GetValue((int)TblTrainingTypeFieldIndex.TrainingTypeName, true); }
set { SetValue((int)TblTrainingTypeFieldIndex.TrainingTypeName, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizTemplateEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblQuizTemplateEntity))]
public virtual EntityCollection<TblQuizTemplateEntity> TblQuizTemplates { get { return GetOrCreateEntityCollection<TblQuizTemplateEntity, TblQuizTemplateEntityFactory>("TblTrainingType", true, false, ref _tblQuizTemplates); } }
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace Datalib
{
public enum TblTrainingTypeFieldIndex
{
///<summary>TrainingTypeId. </summary>
TrainingTypeId,
///<summary>TrainingTypeName. </summary>
TrainingTypeName,
/// <summary></summary>
AmountOfFields
}
}
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblTrainingType. </summary>
public partial class TblTrainingTypeRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between TblTrainingTypeEntity and TblQuizTemplateEntity over the 1:n relation they have, using the relation between the fields: TblTrainingType.TrainingTypeId - TblQuizTemplate.TrainingTypeId</summary>
public virtual IEntityRelation TblQuizTemplateEntityUsingTrainingTypeId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizTemplates", true, new[] { TblTrainingTypeFields.TrainingTypeId, TblQuizTemplateFields.TrainingTypeId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblTrainingTypeRelations
{
internal static readonly IEntityRelation TblQuizTemplateEntityUsingTrainingTypeIdStatic = new TblTrainingTypeRelations().TblQuizTemplateEntityUsingTrainingTypeId;
/// <summary>CTor</summary>
static StaticTblTrainingTypeRelations() { }
}
}