Upload to server
uploading
This commit is contained in:
305
patientman/Datalib/DatabaseGeneric/Linq/LinqMetaData.cs
Normal file
305
patientman/Datalib/DatabaseGeneric/Linq/LinqMetaData.cs
Normal file
@@ -0,0 +1,305 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////////
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using SD.LLBLGen.Pro.LinqSupportClasses;
|
||||
using SD.LLBLGen.Pro.ORMSupportClasses;
|
||||
|
||||
using Datalib;
|
||||
using Datalib.EntityClasses;
|
||||
using Datalib.FactoryClasses;
|
||||
using Datalib.HelperClasses;
|
||||
using Datalib.RelationClasses;
|
||||
|
||||
namespace Datalib.Linq
|
||||
{
|
||||
/// <summary>Meta-data class for the construction of Linq queries which are to be executed using LLBLGen Pro code.</summary>
|
||||
public partial class LinqMetaData: ILinqMetaData
|
||||
{
|
||||
#region Class Member Declarations
|
||||
private IDataAccessAdapter _adapterToUse;
|
||||
private FunctionMappingStore _customFunctionMappings;
|
||||
private Context _contextToUse;
|
||||
#endregion
|
||||
|
||||
/// <summary>CTor. Using this ctor will leave the IDataAccessAdapter object to use empty. To be able to execute the query, an IDataAccessAdapter instance
|
||||
/// is required, and has to be set on the LLBLGenProProvider2 object in the query to execute. </summary>
|
||||
public LinqMetaData() : this(null, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
|
||||
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
|
||||
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
|
||||
/// till they go out of scope.</remarks>
|
||||
public LinqMetaData(IDataAccessAdapter adapterToUse) : this (adapterToUse, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
|
||||
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
|
||||
/// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
|
||||
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
|
||||
/// till they go out of scope.</remarks>
|
||||
public LinqMetaData(IDataAccessAdapter adapterToUse, FunctionMappingStore customFunctionMappings)
|
||||
{
|
||||
_adapterToUse = adapterToUse;
|
||||
_customFunctionMappings = customFunctionMappings;
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
|
||||
/// <param name="typeOfEntity">the type of the entity to get the datasource for</param>
|
||||
/// <returns>the requested datasource</returns>
|
||||
public IDataSource GetQueryableForEntity(int typeOfEntity)
|
||||
{
|
||||
IDataSource toReturn = null;
|
||||
switch((Datalib.EntityType)typeOfEntity)
|
||||
{
|
||||
case Datalib.EntityType.TblAgeGroupEntity:
|
||||
toReturn = this.TblAgeGroup;
|
||||
break;
|
||||
case Datalib.EntityType.TblAgencyEntity:
|
||||
toReturn = this.TblAgency;
|
||||
break;
|
||||
case Datalib.EntityType.TblChildEntity:
|
||||
toReturn = this.TblChild;
|
||||
break;
|
||||
case Datalib.EntityType.TblClinicInfoEntity:
|
||||
toReturn = this.TblClinicInfo;
|
||||
break;
|
||||
case Datalib.EntityType.TblCommuneEntity:
|
||||
toReturn = this.TblCommune;
|
||||
break;
|
||||
case Datalib.EntityType.TblDiaryEntity:
|
||||
toReturn = this.TblDiary;
|
||||
break;
|
||||
case Datalib.EntityType.TblDistrictEntity:
|
||||
toReturn = this.TblDistrict;
|
||||
break;
|
||||
case Datalib.EntityType.TblExaminationInfoEntity:
|
||||
toReturn = this.TblExaminationInfo;
|
||||
break;
|
||||
case Datalib.EntityType.TblPatientEntity:
|
||||
toReturn = this.TblPatient;
|
||||
break;
|
||||
case Datalib.EntityType.TblPreClinicsInfoEntity:
|
||||
toReturn = this.TblPreClinicsInfo;
|
||||
break;
|
||||
case Datalib.EntityType.TblPregnanceInfoEntity:
|
||||
toReturn = this.TblPregnanceInfo;
|
||||
break;
|
||||
case Datalib.EntityType.TblProvinceEntity:
|
||||
toReturn = this.TblProvince;
|
||||
break;
|
||||
case Datalib.EntityType.TblReferralFromPlaceEntity:
|
||||
toReturn = this.TblReferralFromPlace;
|
||||
break;
|
||||
case Datalib.EntityType.TblReferralsToEntity:
|
||||
toReturn = this.TblReferralsTo;
|
||||
break;
|
||||
case Datalib.EntityType.TblReferraltoServiceEntity:
|
||||
toReturn = this.TblReferraltoService;
|
||||
break;
|
||||
case Datalib.EntityType.TblRegimenEntity:
|
||||
toReturn = this.TblRegimen;
|
||||
break;
|
||||
case Datalib.EntityType.TblRegimenStopReasonEntity:
|
||||
toReturn = this.TblRegimenStopReason;
|
||||
break;
|
||||
case Datalib.EntityType.TblServiceEntity:
|
||||
toReturn = this.TblService;
|
||||
break;
|
||||
case Datalib.EntityType.TblTestEntity:
|
||||
toReturn = this.TblTest;
|
||||
break;
|
||||
case Datalib.EntityType.TblTreatmentEntity:
|
||||
toReturn = this.TblTreatment;
|
||||
break;
|
||||
case Datalib.EntityType.TblTreatmentInfoEntity:
|
||||
toReturn = this.TblTreatmentInfo;
|
||||
break;
|
||||
case Datalib.EntityType.TblWaitingListEntity:
|
||||
toReturn = this.TblWaitingList;
|
||||
break;
|
||||
default:
|
||||
toReturn = null;
|
||||
break;
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
|
||||
/// <typeparam name="TEntity">the type of the entity to get the datasource for</typeparam>
|
||||
/// <returns>the requested datasource</returns>
|
||||
public DataSource2<TEntity> GetQueryableForEntity<TEntity>()
|
||||
where TEntity : class
|
||||
{
|
||||
return new DataSource2<TEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse);
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblAgeGroupEntity instances in the database.</summary>
|
||||
public DataSource2<TblAgeGroupEntity> TblAgeGroup
|
||||
{
|
||||
get { return new DataSource2<TblAgeGroupEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblAgencyEntity instances in the database.</summary>
|
||||
public DataSource2<TblAgencyEntity> TblAgency
|
||||
{
|
||||
get { return new DataSource2<TblAgencyEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblChildEntity instances in the database.</summary>
|
||||
public DataSource2<TblChildEntity> TblChild
|
||||
{
|
||||
get { return new DataSource2<TblChildEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblClinicInfoEntity instances in the database.</summary>
|
||||
public DataSource2<TblClinicInfoEntity> TblClinicInfo
|
||||
{
|
||||
get { return new DataSource2<TblClinicInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblCommuneEntity instances in the database.</summary>
|
||||
public DataSource2<TblCommuneEntity> TblCommune
|
||||
{
|
||||
get { return new DataSource2<TblCommuneEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblDiaryEntity instances in the database.</summary>
|
||||
public DataSource2<TblDiaryEntity> TblDiary
|
||||
{
|
||||
get { return new DataSource2<TblDiaryEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblDistrictEntity instances in the database.</summary>
|
||||
public DataSource2<TblDistrictEntity> TblDistrict
|
||||
{
|
||||
get { return new DataSource2<TblDistrictEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblExaminationInfoEntity instances in the database.</summary>
|
||||
public DataSource2<TblExaminationInfoEntity> TblExaminationInfo
|
||||
{
|
||||
get { return new DataSource2<TblExaminationInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblPatientEntity instances in the database.</summary>
|
||||
public DataSource2<TblPatientEntity> TblPatient
|
||||
{
|
||||
get { return new DataSource2<TblPatientEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblPreClinicsInfoEntity instances in the database.</summary>
|
||||
public DataSource2<TblPreClinicsInfoEntity> TblPreClinicsInfo
|
||||
{
|
||||
get { return new DataSource2<TblPreClinicsInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblPregnanceInfoEntity instances in the database.</summary>
|
||||
public DataSource2<TblPregnanceInfoEntity> TblPregnanceInfo
|
||||
{
|
||||
get { return new DataSource2<TblPregnanceInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblProvinceEntity instances in the database.</summary>
|
||||
public DataSource2<TblProvinceEntity> TblProvince
|
||||
{
|
||||
get { return new DataSource2<TblProvinceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblReferralFromPlaceEntity instances in the database.</summary>
|
||||
public DataSource2<TblReferralFromPlaceEntity> TblReferralFromPlace
|
||||
{
|
||||
get { return new DataSource2<TblReferralFromPlaceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblReferralsToEntity instances in the database.</summary>
|
||||
public DataSource2<TblReferralsToEntity> TblReferralsTo
|
||||
{
|
||||
get { return new DataSource2<TblReferralsToEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblReferraltoServiceEntity instances in the database.</summary>
|
||||
public DataSource2<TblReferraltoServiceEntity> TblReferraltoService
|
||||
{
|
||||
get { return new DataSource2<TblReferraltoServiceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblRegimenEntity instances in the database.</summary>
|
||||
public DataSource2<TblRegimenEntity> TblRegimen
|
||||
{
|
||||
get { return new DataSource2<TblRegimenEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblRegimenStopReasonEntity instances in the database.</summary>
|
||||
public DataSource2<TblRegimenStopReasonEntity> TblRegimenStopReason
|
||||
{
|
||||
get { return new DataSource2<TblRegimenStopReasonEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblServiceEntity instances in the database.</summary>
|
||||
public DataSource2<TblServiceEntity> TblService
|
||||
{
|
||||
get { return new DataSource2<TblServiceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblTestEntity instances in the database.</summary>
|
||||
public DataSource2<TblTestEntity> TblTest
|
||||
{
|
||||
get { return new DataSource2<TblTestEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblTreatmentEntity instances in the database.</summary>
|
||||
public DataSource2<TblTreatmentEntity> TblTreatment
|
||||
{
|
||||
get { return new DataSource2<TblTreatmentEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblTreatmentInfoEntity instances in the database.</summary>
|
||||
public DataSource2<TblTreatmentInfoEntity> TblTreatmentInfo
|
||||
{
|
||||
get { return new DataSource2<TblTreatmentInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
/// <summary>returns the datasource to use in a Linq query when targeting TblWaitingListEntity instances in the database.</summary>
|
||||
public DataSource2<TblWaitingListEntity> TblWaitingList
|
||||
{
|
||||
get { return new DataSource2<TblWaitingListEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
|
||||
}
|
||||
|
||||
|
||||
#region Class Property Declarations
|
||||
/// <summary> Gets / sets the IDataAccessAdapter to use for the queries created with this meta data object.</summary>
|
||||
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
|
||||
/// till they go out of scope.</remarks>
|
||||
public IDataAccessAdapter AdapterToUse
|
||||
{
|
||||
get { return _adapterToUse;}
|
||||
set { _adapterToUse = value;}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the custom function mappings to use. These take higher precedence than the ones in the DQE to use</summary>
|
||||
public FunctionMappingStore CustomFunctionMappings
|
||||
{
|
||||
get { return _customFunctionMappings; }
|
||||
set { _customFunctionMappings = value; }
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the Context instance to use for entity fetches.</summary>
|
||||
public Context ContextToUse
|
||||
{
|
||||
get { return _contextToUse;}
|
||||
set { _contextToUse = value;}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user