///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// Implements the relations factory for the entity: TblPregnanceInfo.
public partial class TblPregnanceInfoRelations
{
/// CTor
public TblPregnanceInfoRelations()
{
}
/// Gets all relations of the TblPregnanceInfoEntity as a list of IEntityRelation objects.
/// a list of IEntityRelation objects
public virtual List GetAllRelations()
{
List toReturn = new List();
toReturn.Add(this.TblChildEntityUsingPreganceId);
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// Returns a new IEntityRelation object, between TblPregnanceInfoEntity and TblChildEntity over the 1:n relation they have, using the relation between the fields:
/// TblPregnanceInfo.UniqueKey - TblChild.PreganceId
///
public virtual IEntityRelation TblChildEntityUsingPreganceId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblChildren" , true);
relation.AddEntityFieldPair(TblPregnanceInfoFields.UniqueKey, TblChildFields.PreganceId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblChildEntity", false);
return relation;
}
}
/// Returns a new IEntityRelation object, between TblPregnanceInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblPregnanceInfo.PatientId - TblPatient.PatientId
///
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblPregnanceInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", true);
return relation;
}
}
/// stub, not used in this entity, only for TargetPerEntity entities.
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// stub, not used in this entity, only for TargetPerEntity entities.
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// Static class which is used for providing relationship instances which are re-used internally for syncing
internal static class StaticTblPregnanceInfoRelations
{
internal static readonly IEntityRelation TblChildEntityUsingPreganceIdStatic = new TblPregnanceInfoRelations().TblChildEntityUsingPreganceId;
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblPregnanceInfoRelations().TblPatientEntityUsingPatientId;
/// CTor
static StaticTblPregnanceInfoRelations()
{
}
}
}