Orderdetail

[Back to 101 LINQ examples using Batches]

package tests.sql.northwind;
 
import batch.Fun;
import batch.sql.Column;
import batch.sql.Table;
 
@Table(name="`Order Details`")
public class Order_Details {
    @Column(name="OrderID")
    public Order Order;
 
    @Column(name="ProductID")
    public Product Product;
 
    public float UnitPrice;
 
    public int Quantity;
 
    public float Discount;
 
    static public Fun<Order_Details, Double> ByTotal = new Fun<Order_Details, Double>() {
      public Double apply(Order_Details o) {
        return (double) o.UnitPrice * o.Quantity;
      }
    };
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License