267 lines
13 KiB
C#
267 lines
13 KiB
C#
//////////////////////////////////////////////////////////////
|
|
// <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() { }
|
|
}
|
|
}
|