private object BuildReferenceDto(OrderDetail item)
 {
     return new{
         StringId = _stringConverter.ToString(item),
         Description = item.ToString(),
     };
 }
Exemplo n.º 2
0
 public virtual bool Equals(OrderDetail other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     if (OrderId != default(int) && ProductId != default(int))
     {
         return other.OrderId == OrderId && other.ProductId == ProductId;
     }
     return other.OrderId == OrderId && other.ProductId == ProductId && other.UnitPrice == UnitPrice && other.Quantity == Quantity && other.Discount == Discount;
 }
 private object BuildFullDto(OrderDetail item)
 {
     return new{
         StringId = _stringConverter.ToString(item),
         item.OrderId,
         item.ProductId,
         item.UnitPrice,
         item.Quantity,
         item.Discount,
     };
 }
 public string ToString(OrderDetail obj)
 {
     return obj.OrderId.ToString() + KeySeparator + obj.ProductId;
 }
 public void Update(OrderDetail v)
 {
     _Northwind.Update(v);
 }
 public OrderDetail Read(int orderId, int productId)
 {
     var keyObject = new OrderDetail {OrderId = orderId, ProductId = productId};
     return _Northwind.Load<OrderDetail>(keyObject);
 }
 public void Delete(OrderDetail v)
 {
     _Northwind.Delete(v);
 }
 public void Create(OrderDetail v)
 {
     _Northwind.Save(v);
 }
 public void Update(OrderDetail v)
 {
     _northwind.GetCurrentSession().Update(v);
 }
Exemplo n.º 10
0
 public OrderDetail Read(int orderId, int productId)
 {
     var keyObject = new OrderDetail{ OrderId = orderId, ProductId = productId };
     return _northwind.GetCurrentSession().Load<OrderDetail>(keyObject);
 }
Exemplo n.º 11
0
 public void Delete(OrderDetail v)
 {
     _northwind.GetCurrentSession().Delete(v);
 }
Exemplo n.º 12
0
 public void Create(OrderDetail v)
 {
     _northwind.GetCurrentSession().Save(v);
 }