.NET????????????????2??
???????????? ???????[ 2013/10/11 14:19:01 ] ????????
????????????????????????AddOrder???????в???????涼?????????Order testOrder = new Order() ?????????????????Order???????????????????????????????????????????в?????????????м??????ζ???????в?????????????N????????????????????????
??????????????????????????????????????????????????????п?????????????????????Σ?
????????????幹??
????Order testOrder = this.InitNormalOrder();
????Order testOrder = this.InitNormalOrder();
????????OrderId????????????????????String.Empty??
????<STRONG>Order testOrder = this.InitNormalOrder();
????testOrder.OrderId = string.Empty; </STRONG>
????Order testOrder = this.InitNormalOrder();
????testOrder.OrderId = string.Empty; ????????????γ???仯????????????????????????????Щ?????????????????????????????????е???????????????????????????
????3??LINQ?????????д???????????LINQд???????Function??????LINQ?????У?
?????????LINQ????д???????????????????????????????????LINQд??????????????????????????????????????????????????????????????????????????????????????У????????????????????????????????LINQ?????滻???????Function??????
????LINQ???????????????????????????????????Linq to Object?У?????????Linq to Provider?ж?????LINQ????????????????????????????Service????LINQ????????????????????????????б?д????????LINQ?д???????ж????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????ж??????????????OrderService?????
????public Order SelectByOrderId(string orderId)
????{
????List<Order> orders = new List<Order>()
????{
????new Order(){ OrderId="123"?? SubmitDT=DateTime.Now.AddDays(1)}??
????new Order(){ OrderId="234"}
????};
????var list = orders.Where(order => order.OrderId == orderId && order.SubmitDT > DateTime.Now);
????if (list.Count() > 0)
????return list.ToList()[0];
????return null;
????}
????public Order SelectByOrderId(string orderId)
????{
????List<Order> orders = new List<Order>()
????{
????new Order(){ OrderId="123"?? SubmitDT=DateTime.Now.AddDays(1)}??
????new Order(){ OrderId="234"}
????};
????var list = orders.Where(order => order.OrderId == orderId && order.SubmitDT > DateTime.Now);
????if (list.Count() > 0)
????return list.ToList()[0];
????return null;
????}
???????????????OrderId???Order??????????????????????????????????????????????????Where??????????????????????????Order????????????Where?е?????????????????????????????????????SubmitDT?????????????????????к?????????????ж??????????????????????????????????????????б?????????????????
????public Order SelectByOrderId(string orderId)
????{
????List<Order> orders = new List<Order>()
????{
????new Order(){ OrderId="123"?? SubmitDT=DateTime.Now.AddDays(1)}??
????new Order(){ OrderId="234"}
????};
????var list = orders.Where(order => IfOrderSubmitAndOrderId(order?? orderId));
????if (list.Count() > 0)
????return list.ToList()[0];
????return null;
????}
????private bool IfOrderSubmitDt(Order order)
????{
????return order.SubmitDT > DateTime.Now;
????}
????private bool IfOrderSubmitAndOrderId(Order order?? string orderId)
????{
????return order.OrderId == orderId && this.IfOrderSubmitDt(order);
????}
????public Order SelectByOrderId(string orderId)
????{
????List<Order> orders = new List<Order>()
????{
????new Order(){ OrderId="123"?? SubmitDT=DateTime.Now.AddDays(1)}??
????new Order(){ OrderId="234"}
????};
????var list = orders.Where(order => IfOrderSubmitAndOrderId(order?? orderId));
????if (list.Count() > 0)
????return list.ToList()[0];
????return null;
????}
????private bool IfOrderSubmitDt(Order order)
????{
????return order.SubmitDT > DateTime.Now;
????}
????private bool IfOrderSubmitAndOrderId(Order order?? string orderId)
????{
????return order.OrderId == orderId && this.IfOrderSubmitDt(order);
????}
?????????????????????е????????????????????????????????????????????????????????????????????????Щ??仯??????????????????
??????????????????????ü?????????????????????????????????????????????е??????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11