本文整理汇总了C#中ISession.Instantiate方法的典型用法代码示例。如果您正苦于以下问题:C# ISession.Instantiate方法的具体用法?C# ISession.Instantiate怎么用?C# ISession.Instantiate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISession
的用法示例。
在下文中一共展示了ISession.Instantiate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppsFindOrCreateAsDependable
public static StoreRevenue AppsFindOrCreateAsDependable(ISession session, SalesInvoice invoice)
{
var storeRevenues = invoice.Store.StoreRevenuesWhereStore;
storeRevenues.Filter.AddEquals(Meta.InternalOrganisation, invoice.BilledFromInternalOrganisation);
storeRevenues.Filter.AddEquals(Meta.Year, invoice.InvoiceDate.Year);
storeRevenues.Filter.AddEquals(Meta.Month, invoice.InvoiceDate.Month);
var storeRevenue = storeRevenues.First ?? new StoreRevenueBuilder(session)
.WithInternalOrganisation(invoice.BilledFromInternalOrganisation)
.WithStore((Store)session.Instantiate(invoice.Store))
.WithYear(invoice.InvoiceDate.Year)
.WithMonth(invoice.InvoiceDate.Month)
.WithCurrency(invoice.BilledFromInternalOrganisation.PreferredCurrency)
.WithRevenue(0M)
.Build();
InternalOrganisationRevenues.AppsFindOrCreateAsDependable(session, storeRevenue);
return storeRevenue;
}
示例2: AppsFindOrCreateAsDependable
public static SalesChannelRevenue AppsFindOrCreateAsDependable(ISession session, SalesInvoice invoice)
{
SalesChannelRevenue salesChannelRevenue = null;
if (invoice.ExistSalesChannel)
{
var salesChannelRevenues = invoice.SalesChannel.SalesChannelRevenuesWhereSalesChannel;
salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.InternalOrganisation, invoice.BilledFromInternalOrganisation);
salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.Year, invoice.InvoiceDate.Year);
salesChannelRevenues.Filter.AddEquals(SalesChannelRevenues.Meta.Month, invoice.InvoiceDate.Month);
salesChannelRevenue = salesChannelRevenues.First ?? new SalesChannelRevenueBuilder(session)
.WithInternalOrganisation(invoice.BilledFromInternalOrganisation)
.WithSalesChannel((SalesChannel)session.Instantiate(invoice.SalesChannel))
.WithYear(invoice.InvoiceDate.Year)
.WithMonth(invoice.InvoiceDate.Month)
.WithCurrency(invoice.BilledFromInternalOrganisation.PreferredCurrency)
.WithRevenue(0M)
.Build();
}
return salesChannelRevenue;
}
示例3: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.contact = (Person)session.Instantiate(this.contact);
this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship);
}
示例4: Instantiate
public static GT32UnitLT32Composite[] Instantiate(ISession session, string[] ids)
{
return (GT32UnitLT32Composite[])session.Instantiate(ids);
}
示例5: Instantiate
public static Sandbox[] Instantiate(ISession session, string[] ids)
{
return (Sandbox[])session.Instantiate(ids);
}
示例6: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.contact = (Person)session.Instantiate(this.contact);
this.supplier = (Organisation)session.Instantiate(this.supplier);
this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
this.supplierRelationship = (SupplierRelationship)session.Instantiate(this.supplierRelationship);
}
示例7: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.employee = (Person)session.Instantiate(this.employee);
this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
this.employment = (Employment)session.Instantiate(this.employment);
}
示例8: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.ownBankAccount = (OwnBankAccount)session.Instantiate(this.ownBankAccount);
this.euro = (Currency)session.Instantiate(this.euro);
this.billingAddress = (PartyContactMechanism)session.Instantiate(this.billingAddress);
}
示例9: Instantiate
public static ClassWithoutUnitRoles[] Instantiate(ISession session, string[] ids)
{
return (ClassWithoutUnitRoles[])session.Instantiate(ids);
}
示例10: Instantiate
public static SingleUnit[] Instantiate(ISession session, string[] ids)
{
return (SingleUnit[])session.Instantiate(ids);
}
示例11: GetUser
public User GetUser(ISession session)
{
return (User)session.Instantiate(this.objectId);
}
示例12: Instantiate
public static C1[] Instantiate(ISession session, string[] ids)
{
return (C1[])session.Instantiate(ids);
}
示例13: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.finishedGood = (FinishedGood)session.Instantiate(this.finishedGood);
this.currentPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.currentPurchasePrice);
this.order = (PurchaseOrder)session.Instantiate(this.order);
this.supplier = (Organisation)session.Instantiate(this.supplier);
}
示例14: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.good = (Good)session.Instantiate(this.good);
this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
this.billToCustomer = (Organisation)session.Instantiate(this.billToCustomer);
}
示例15: InstantiateObjects
private void InstantiateObjects(ISession session)
{
this.productCategory = (ProductCategory)session.Instantiate(this.productCategory);
this.parentProductCategory = (ProductCategory)session.Instantiate(this.parentProductCategory);
this.ancestorProductCategory = (ProductCategory)session.Instantiate(this.ancestorProductCategory);
this.part = (FinishedGood)session.Instantiate(this.part);
this.good = (Good)session.Instantiate(this.good);
this.feature1 = (Colour)session.Instantiate(this.feature1);
this.feature2 = (Colour)session.Instantiate(this.feature2);
this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
this.shipToCustomer = (Organisation)session.Instantiate(this.shipToCustomer);
this.billToCustomer = (Organisation)session.Instantiate(this.billToCustomer);
this.supplier = (Organisation)session.Instantiate(this.supplier);
this.kiev = (City)session.Instantiate(this.kiev);
this.shipToContactMechanismMechelen = (PostalAddress)session.Instantiate(this.shipToContactMechanismMechelen);
this.shipToContactMechanismKiev = (PostalAddress)session.Instantiate(this.shipToContactMechanismKiev);
this.currentBasePriceGeoBoundary = (BasePrice)session.Instantiate(this.currentBasePriceGeoBoundary);
this.currentGoodBasePrice = (BasePrice)session.Instantiate(this.currentGoodBasePrice);
this.currentGood1Feature1BasePrice = (BasePrice)session.Instantiate(this.currentGood1Feature1BasePrice);
this.currentFeature2BasePrice = (BasePrice)session.Instantiate(this.currentFeature2BasePrice);
this.goodPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.goodPurchasePrice);
this.virtualGoodPurchasePrice = (ProductPurchasePrice)session.Instantiate(this.virtualGoodPurchasePrice);
this.currentGoodBasePrice = (BasePrice)session.Instantiate(this.currentGoodBasePrice);
this.goodSupplierOffering = (SupplierOffering)session.Instantiate(this.goodSupplierOffering);
this.virtualgoodSupplierOffering = (SupplierOffering)session.Instantiate(this.virtualgoodSupplierOffering);
this.order = (SalesOrder)session.Instantiate(this.order);
this.vatRate21 = (VatRate)session.Instantiate(this.vatRate21);
}