///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.1
// Code is generated on: Sunday, February 23, 2014 10:56:42 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// 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: TblReferral.
public partial class TblReferralRelations
{
/// CTor
public TblReferralRelations()
{
}
/// Gets all relations of the TblReferralEntity as a list of IEntityRelation objects.
/// a list of IEntityRelation objects
public virtual List GetAllRelations()
{
List toReturn = new List();
toReturn.Add(this.TblAgencyEntityUsingAgencyTypeId);
toReturn.Add(this.TblPatientEntityUsingPatientId);
toReturn.Add(this.TblServiceEntityUsingServiceId);
return toReturn;
}
#region Class Property Declarations
/// Returns a new IEntityRelation object, between TblReferralEntity and TblAgencyEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.AgencyTypeId - TblAgency.AgencyTypeId
///
public virtual IEntityRelation TblAgencyEntityUsingAgencyTypeId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblAgency", false);
relation.AddEntityFieldPair(TblAgencyFields.AgencyTypeId, TblReferralFields.AgencyTypeId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblAgencyEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", true);
return relation;
}
}
/// Returns a new IEntityRelation object, between TblReferralEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.PatientId - TblPatient.PatientId
///
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferralFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", true);
return relation;
}
}
/// Returns a new IEntityRelation object, between TblReferralEntity and TblServiceEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.ServiceId - TblService.ServiceId
///
public virtual IEntityRelation TblServiceEntityUsingServiceId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblService", false);
relation.AddEntityFieldPair(TblServiceFields.ServiceId, TblReferralFields.ServiceId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblServiceEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", 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 StaticTblReferralRelations
{
internal static readonly IEntityRelation TblAgencyEntityUsingAgencyTypeIdStatic = new TblReferralRelations().TblAgencyEntityUsingAgencyTypeId;
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblReferralRelations().TblPatientEntityUsingPatientId;
internal static readonly IEntityRelation TblServiceEntityUsingServiceIdStatic = new TblReferralRelations().TblServiceEntityUsingServiceId;
/// CTor
static StaticTblReferralRelations()
{
}
}
}