Skip to content

NorthwindModel V4 n

Moh.Hassan edited this page Apr 23, 2019 · 1 revision

To generated the navigation properties of the class , use -n option Type the following command:

       o2pgen -r http://services.odata.org/V4/Northwind/Northwind.svc/ -n	
       OR
      o2pgen -nr http://services.odata.org/V4/Northwind/Northwind.svc/ -n	

For description of the different options see: CommandLine Reference or help screen

The generated model is:

 //------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated using  OData2Poco Class library.
//     Service Url: http://services.odata.org/V4/Northwind/Northwind.svc/
//     MetaData Version: 4.0
//     Generated On: 2017-04-02T22:43:34
// </auto-generated>
//------------------------------------------------------------------------------

namespace NorthwindModel
{
using System;
using System.IO;
using System.Collections.Generic;

public class Category
{
    virtual public int CategoryID {get;set;} //PrimaryKey not null

    virtual public string CategoryName {get;set;} // not null

    virtual public string Description {get;set;} 

    virtual public byte[] Picture {get;set;} 

    virtual public List<Product> Products {get;set;} 

}

public class CustomerDemographic
{
    virtual public string CustomerTypeID {get;set;} //PrimaryKey not null

    virtual public string CustomerDesc {get;set;} 

    virtual public List<Customer> Customers {get;set;} 

}

public class Customer
{
    virtual public string CustomerID {get;set;} //PrimaryKey not null

    virtual public string CompanyName {get;set;} // not null

    virtual public string ContactName {get;set;} 

    virtual public string ContactTitle {get;set;} 

    virtual public string Address {get;set;} 

    virtual public string City {get;set;} 

    virtual public string Region {get;set;} 

    virtual public string PostalCode {get;set;} 

    virtual public string Country {get;set;} 

    virtual public string Phone {get;set;} 

    virtual public string Fax {get;set;} 

    virtual public List<Order> Orders {get;set;} 

    virtual public List<CustomerDemographic> CustomerDemographics {get;set;} 

}

public class Employee
{
    virtual public int EmployeeID {get;set;} //PrimaryKey not null

    virtual public string LastName {get;set;} // not null

    virtual public string FirstName {get;set;} // not null

    virtual public string Title {get;set;} 

    virtual public string TitleOfCourtesy {get;set;} 

    virtual public DateTimeOffset BirthDate {get;set;} 

    virtual public DateTimeOffset HireDate {get;set;} 

    virtual public string Address {get;set;} 

    virtual public string City {get;set;} 

    virtual public string Region {get;set;} 

    virtual public string PostalCode {get;set;} 

    virtual public string Country {get;set;} 

    virtual public string HomePhone {get;set;} 

    virtual public string Extension {get;set;} 

    virtual public byte[] Photo {get;set;} 

    virtual public string Notes {get;set;} 

    virtual public int ReportsTo {get;set;} 

    virtual public string PhotoPath {get;set;} 

    virtual public List<Employee> Employees1 {get;set;} 

    virtual public Employee Employee1 {get;set;} 

    virtual public List<Order> Orders {get;set;} 

    virtual public List<Territory> Territories {get;set;} 

}

public class Order_Detail
{
    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public decimal UnitPrice {get;set;} // not null

    virtual public short Quantity {get;set;} // not null

    virtual public float Discount {get;set;} // not null

    virtual public Order Order {get;set;} // not null

    virtual public Product Product {get;set;} // not null

}

public class Order
{
    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public string CustomerID {get;set;} 

    virtual public int EmployeeID {get;set;} 

    virtual public DateTimeOffset OrderDate {get;set;} 

    virtual public DateTimeOffset RequiredDate {get;set;} 

    virtual public DateTimeOffset ShippedDate {get;set;} 

    virtual public int ShipVia {get;set;} 

    virtual public decimal Freight {get;set;} 

    virtual public string ShipName {get;set;} 

    virtual public string ShipAddress {get;set;} 

    virtual public string ShipCity {get;set;} 

    virtual public string ShipRegion {get;set;} 

    virtual public string ShipPostalCode {get;set;} 

    virtual public string ShipCountry {get;set;} 

    virtual public Customer Customer {get;set;} 

    virtual public Employee Employee {get;set;} 

    virtual public List<Order_Detail> Order_Details {get;set;} 

    virtual public Shipper Shipper {get;set;} 

}

public class Product
{
    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} // not null

    virtual public int SupplierID {get;set;} 

    virtual public int CategoryID {get;set;} 

    virtual public string QuantityPerUnit {get;set;} 

    virtual public decimal UnitPrice {get;set;} 

    virtual public short UnitsInStock {get;set;} 

    virtual public short UnitsOnOrder {get;set;} 

    virtual public short ReorderLevel {get;set;} 

    virtual public bool Discontinued {get;set;} // not null

    virtual public Category Category {get;set;} 

    virtual public List<Order_Detail> Order_Details {get;set;} 

    virtual public Supplier Supplier {get;set;} 

}

public class Region
{
    virtual public int RegionID {get;set;} //PrimaryKey not null

    virtual public string RegionDescription {get;set;} // not null

    virtual public List<Territory> Territories {get;set;} 

}

public class Shipper
{
    virtual public int ShipperID {get;set;} //PrimaryKey not null

    virtual public string CompanyName {get;set;} // not null

    virtual public string Phone {get;set;} 

    virtual public List<Order> Orders {get;set;} 

}

public class Supplier
{
    virtual public int SupplierID {get;set;} //PrimaryKey not null

    virtual public string CompanyName {get;set;} // not null

    virtual public string ContactName {get;set;} 

    virtual public string ContactTitle {get;set;} 

    virtual public string Address {get;set;} 

    virtual public string City {get;set;} 

    virtual public string Region {get;set;} 

    virtual public string PostalCode {get;set;} 

    virtual public string Country {get;set;} 

    virtual public string Phone {get;set;} 

    virtual public string Fax {get;set;} 

    virtual public string HomePage {get;set;} 

    virtual public List<Product> Products {get;set;} 

}

public class Territory
{
    virtual public string TerritoryID {get;set;} //PrimaryKey not null

    virtual public string TerritoryDescription {get;set;} // not null

    virtual public int RegionID {get;set;} // not null

    virtual public Region Region {get;set;} // not null

    virtual public List<Employee> Employees {get;set;} 

}

public class Alphabetical_list_of_product
{
    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public int SupplierID {get;set;} 

    virtual public int CategoryID {get;set;} 

    virtual public string QuantityPerUnit {get;set;} 

    virtual public decimal UnitPrice {get;set;} 

    virtual public short UnitsInStock {get;set;} 

    virtual public short UnitsOnOrder {get;set;} 

    virtual public short ReorderLevel {get;set;} 

    virtual public bool Discontinued {get;set;} //PrimaryKey not null

    virtual public string CategoryName {get;set;} //PrimaryKey not null

}

public class Category_Sales_for_1997
{
    virtual public string CategoryName {get;set;} //PrimaryKey not null

    virtual public decimal CategorySales {get;set;} 

}

public class Current_Product_List
{
    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

}

public class Customer_and_Suppliers_by_City
{
    virtual public string City {get;set;} 

    virtual public string CompanyName {get;set;} //PrimaryKey not null

    virtual public string ContactName {get;set;} 

    virtual public string Relationship {get;set;} //PrimaryKey not null

}

public class Invoice
{
    virtual public string ShipName {get;set;} 

    virtual public string ShipAddress {get;set;} 

    virtual public string ShipCity {get;set;} 

    virtual public string ShipRegion {get;set;} 

    virtual public string ShipPostalCode {get;set;} 

    virtual public string ShipCountry {get;set;} 

    virtual public string CustomerID {get;set;} 

    virtual public string CustomerName {get;set;} //PrimaryKey not null

    virtual public string Address {get;set;} 

    virtual public string City {get;set;} 

    virtual public string Region {get;set;} 

    virtual public string PostalCode {get;set;} 

    virtual public string Country {get;set;} 

    virtual public string Salesperson {get;set;} //PrimaryKey not null

    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public DateTimeOffset OrderDate {get;set;} 

    virtual public DateTimeOffset RequiredDate {get;set;} 

    virtual public DateTimeOffset ShippedDate {get;set;} 

    virtual public string ShipperName {get;set;} //PrimaryKey not null

    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public decimal UnitPrice {get;set;} //PrimaryKey not null

    virtual public short Quantity {get;set;} //PrimaryKey not null

    virtual public float Discount {get;set;} //PrimaryKey not null

    virtual public decimal ExtendedPrice {get;set;} 

    virtual public decimal Freight {get;set;} 

}

public class Order_Details_Extended
{
    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public int ProductID {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public decimal UnitPrice {get;set;} //PrimaryKey not null

    virtual public short Quantity {get;set;} //PrimaryKey not null

    virtual public float Discount {get;set;} //PrimaryKey not null

    virtual public decimal ExtendedPrice {get;set;} 

}

public class Order_Subtotal
{
    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public decimal Subtotal {get;set;} 

}

public class Orders_Qry
{
    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public string CustomerID {get;set;} 

    virtual public int EmployeeID {get;set;} 

    virtual public DateTimeOffset OrderDate {get;set;} 

    virtual public DateTimeOffset RequiredDate {get;set;} 

    virtual public DateTimeOffset ShippedDate {get;set;} 

    virtual public int ShipVia {get;set;} 

    virtual public decimal Freight {get;set;} 

    virtual public string ShipName {get;set;} 

    virtual public string ShipAddress {get;set;} 

    virtual public string ShipCity {get;set;} 

    virtual public string ShipRegion {get;set;} 

    virtual public string ShipPostalCode {get;set;} 

    virtual public string ShipCountry {get;set;} 

    virtual public string CompanyName {get;set;} //PrimaryKey not null

    virtual public string Address {get;set;} 

    virtual public string City {get;set;} 

    virtual public string Region {get;set;} 

    virtual public string PostalCode {get;set;} 

    virtual public string Country {get;set;} 

}

public class Product_Sales_for_1997
{
    virtual public string CategoryName {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public decimal ProductSales {get;set;} 

}

public class Products_Above_Average_Price
{
    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public decimal UnitPrice {get;set;} 

}

public class Products_by_Category
{
    virtual public string CategoryName {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public string QuantityPerUnit {get;set;} 

    virtual public short UnitsInStock {get;set;} 

    virtual public bool Discontinued {get;set;} //PrimaryKey not null

}

public class Sales_by_Category
{
    virtual public int CategoryID {get;set;} //PrimaryKey not null

    virtual public string CategoryName {get;set;} //PrimaryKey not null

    virtual public string ProductName {get;set;} //PrimaryKey not null

    virtual public decimal ProductSales {get;set;} 

}

public class Sales_Totals_by_Amount
{
    virtual public decimal SaleAmount {get;set;} 

    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public string CompanyName {get;set;} //PrimaryKey not null

    virtual public DateTimeOffset ShippedDate {get;set;} 

}

public class Summary_of_Sales_by_Quarter
{
    virtual public DateTimeOffset ShippedDate {get;set;} 

    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public decimal Subtotal {get;set;} 

}

public class Summary_of_Sales_by_Year
{
    virtual public DateTimeOffset ShippedDate {get;set;} 

    virtual public int OrderID {get;set;} //PrimaryKey not null

    virtual public decimal Subtotal {get;set;} 

}

}

Clone this wiki locally