本文整理汇总了C#中Customer.Find方法的典型用法代码示例。如果您正苦于以下问题:C# Customer.Find方法的具体用法?C# Customer.Find怎么用?C# Customer.Find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer.Find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OneToOneReadByPrimaryKeyTest
public void OneToOneReadByPrimaryKeyTest()
{
using (EasySession easySession = new EasySession())
{
///[Test Read] - one-to-one relationship
Customer customer = new Customer();
customer.CustomerID = 11000;
Customer resultList = customer.Find(easySession);
Assert.IsNotNull(resultList, "Result is null");
}
}
示例2: Purchase
public virtual void Purchase(Customer c)
{
if (status != MachineStatus.Shutdown)
{
// customer make selection
chosen = new Good("Вафли");
display.Show("Вы выбрали " + chosen.Name);
expected = prices[chosen];
while (!CheckTotal())
{
if (cancel)
break;
display.Show("Внесите " + WaitFor() + " руб");
c.CheckoutWallet();
Coin coin = c.Find();
if (c.isAvaliable(coin))
{
c.Spend(coin);
Insert(c, coin);
}
if (totalBill > expected)
c.Get(new Coin(totalBill-expected));
}
c.CheckoutWallet();
display.Show("Вот " + chosen.Name);
totalBill = 0;
}
}