-
Notifications
You must be signed in to change notification settings - Fork 22
NorthwindModel V4 j camel
Moh.Hassan edited this page Apr 23, 2019
·
1 revision
Command:
o2pgen -r http://services.odata.org/V4/Northwind/Northwind.svc/ -j -c camel
//------------------------------------------------------------------------------
// <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-03T00:30:32
// </auto-generated>
//------------------------------------------------------------------------------
namespace NorthwindModel
{
using System;
using System.IO;
using System.Collections.Generic;
using Newtonsoft.Json;
public class Category
{
[JsonProperty(PropertyName = "CategoryID")]
public int categoryID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} // not null
[JsonProperty(PropertyName = "Description")]
public string description {get;set;}
[JsonProperty(PropertyName = "Picture")]
public byte[] picture {get;set;}
}
public class CustomerDemographic
{
[JsonProperty(PropertyName = "CustomerTypeID")]
public string customerTypeID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CustomerDesc")]
public string customerDesc {get;set;}
}
public class Customer
{
[JsonProperty(PropertyName = "CustomerID")]
public string customerID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} // not null
[JsonProperty(PropertyName = "ContactName")]
public string contactName {get;set;}
[JsonProperty(PropertyName = "ContactTitle")]
public string contactTitle {get;set;}
[JsonProperty(PropertyName = "Address")]
public string address {get;set;}
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "Region")]
public string region {get;set;}
[JsonProperty(PropertyName = "PostalCode")]
public string postalCode {get;set;}
[JsonProperty(PropertyName = "Country")]
public string country {get;set;}
[JsonProperty(PropertyName = "Phone")]
public string phone {get;set;}
[JsonProperty(PropertyName = "Fax")]
public string fax {get;set;}
}
public class Employee
{
[JsonProperty(PropertyName = "EmployeeID")]
public int employeeID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "LastName")]
public string lastName {get;set;} // not null
[JsonProperty(PropertyName = "FirstName")]
public string firstName {get;set;} // not null
[JsonProperty(PropertyName = "Title")]
public string title {get;set;}
[JsonProperty(PropertyName = "TitleOfCourtesy")]
public string titleOfCourtesy {get;set;}
[JsonProperty(PropertyName = "BirthDate")]
public DateTimeOffset birthDate {get;set;}
[JsonProperty(PropertyName = "HireDate")]
public DateTimeOffset hireDate {get;set;}
[JsonProperty(PropertyName = "Address")]
public string address {get;set;}
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "Region")]
public string region {get;set;}
[JsonProperty(PropertyName = "PostalCode")]
public string postalCode {get;set;}
[JsonProperty(PropertyName = "Country")]
public string country {get;set;}
[JsonProperty(PropertyName = "HomePhone")]
public string homePhone {get;set;}
[JsonProperty(PropertyName = "Extension")]
public string extension {get;set;}
[JsonProperty(PropertyName = "Photo")]
public byte[] photo {get;set;}
[JsonProperty(PropertyName = "Notes")]
public string notes {get;set;}
[JsonProperty(PropertyName = "ReportsTo")]
public int reportsTo {get;set;}
[JsonProperty(PropertyName = "PhotoPath")]
public string photoPath {get;set;}
}
public class Order_Detail
{
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;} // not null
[JsonProperty(PropertyName = "Quantity")]
public short quantity {get;set;} // not null
[JsonProperty(PropertyName = "Discount")]
public float discount {get;set;} // not null
}
public class Order
{
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CustomerID")]
public string customerID {get;set;}
[JsonProperty(PropertyName = "EmployeeID")]
public int employeeID {get;set;}
[JsonProperty(PropertyName = "OrderDate")]
public DateTimeOffset orderDate {get;set;}
[JsonProperty(PropertyName = "RequiredDate")]
public DateTimeOffset requiredDate {get;set;}
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
[JsonProperty(PropertyName = "ShipVia")]
public int shipVia {get;set;}
[JsonProperty(PropertyName = "Freight")]
public decimal freight {get;set;}
[JsonProperty(PropertyName = "ShipName")]
public string shipName {get;set;}
[JsonProperty(PropertyName = "ShipAddress")]
public string shipAddress {get;set;}
[JsonProperty(PropertyName = "ShipCity")]
public string shipCity {get;set;}
[JsonProperty(PropertyName = "ShipRegion")]
public string shipRegion {get;set;}
[JsonProperty(PropertyName = "ShipPostalCode")]
public string shipPostalCode {get;set;}
[JsonProperty(PropertyName = "ShipCountry")]
public string shipCountry {get;set;}
}
public class Product
{
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} // not null
[JsonProperty(PropertyName = "SupplierID")]
public int supplierID {get;set;}
[JsonProperty(PropertyName = "CategoryID")]
public int categoryID {get;set;}
[JsonProperty(PropertyName = "QuantityPerUnit")]
public string quantityPerUnit {get;set;}
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;}
[JsonProperty(PropertyName = "UnitsInStock")]
public short unitsInStock {get;set;}
[JsonProperty(PropertyName = "UnitsOnOrder")]
public short unitsOnOrder {get;set;}
[JsonProperty(PropertyName = "ReorderLevel")]
public short reorderLevel {get;set;}
[JsonProperty(PropertyName = "Discontinued")]
public bool discontinued {get;set;} // not null
}
public class Region
{
[JsonProperty(PropertyName = "RegionID")]
public int regionID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "RegionDescription")]
public string regionDescription {get;set;} // not null
}
public class Shipper
{
[JsonProperty(PropertyName = "ShipperID")]
public int shipperID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} // not null
[JsonProperty(PropertyName = "Phone")]
public string phone {get;set;}
}
public class Supplier
{
[JsonProperty(PropertyName = "SupplierID")]
public int supplierID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} // not null
[JsonProperty(PropertyName = "ContactName")]
public string contactName {get;set;}
[JsonProperty(PropertyName = "ContactTitle")]
public string contactTitle {get;set;}
[JsonProperty(PropertyName = "Address")]
public string address {get;set;}
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "Region")]
public string region {get;set;}
[JsonProperty(PropertyName = "PostalCode")]
public string postalCode {get;set;}
[JsonProperty(PropertyName = "Country")]
public string country {get;set;}
[JsonProperty(PropertyName = "Phone")]
public string phone {get;set;}
[JsonProperty(PropertyName = "Fax")]
public string fax {get;set;}
[JsonProperty(PropertyName = "HomePage")]
public string homePage {get;set;}
}
public class Territory
{
[JsonProperty(PropertyName = "TerritoryID")]
public string territoryID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "TerritoryDescription")]
public string territoryDescription {get;set;} // not null
[JsonProperty(PropertyName = "RegionID")]
public int regionID {get;set;} // not null
}
public class Alphabetical_list_of_product
{
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "SupplierID")]
public int supplierID {get;set;}
[JsonProperty(PropertyName = "CategoryID")]
public int categoryID {get;set;}
[JsonProperty(PropertyName = "QuantityPerUnit")]
public string quantityPerUnit {get;set;}
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;}
[JsonProperty(PropertyName = "UnitsInStock")]
public short unitsInStock {get;set;}
[JsonProperty(PropertyName = "UnitsOnOrder")]
public short unitsOnOrder {get;set;}
[JsonProperty(PropertyName = "ReorderLevel")]
public short reorderLevel {get;set;}
[JsonProperty(PropertyName = "Discontinued")]
public bool discontinued {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} //PrimaryKey not null
}
public class Category_Sales_for_1997
{
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CategorySales")]
public decimal categorySales {get;set;}
}
public class Current_Product_List
{
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
}
public class Customer_and_Suppliers_by_City
{
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ContactName")]
public string contactName {get;set;}
[JsonProperty(PropertyName = "Relationship")]
public string relationship {get;set;} //PrimaryKey not null
}
public class Invoice
{
[JsonProperty(PropertyName = "ShipName")]
public string shipName {get;set;}
[JsonProperty(PropertyName = "ShipAddress")]
public string shipAddress {get;set;}
[JsonProperty(PropertyName = "ShipCity")]
public string shipCity {get;set;}
[JsonProperty(PropertyName = "ShipRegion")]
public string shipRegion {get;set;}
[JsonProperty(PropertyName = "ShipPostalCode")]
public string shipPostalCode {get;set;}
[JsonProperty(PropertyName = "ShipCountry")]
public string shipCountry {get;set;}
[JsonProperty(PropertyName = "CustomerID")]
public string customerID {get;set;}
[JsonProperty(PropertyName = "CustomerName")]
public string customerName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Address")]
public string address {get;set;}
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "Region")]
public string region {get;set;}
[JsonProperty(PropertyName = "PostalCode")]
public string postalCode {get;set;}
[JsonProperty(PropertyName = "Country")]
public string country {get;set;}
[JsonProperty(PropertyName = "Salesperson")]
public string salesperson {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "OrderDate")]
public DateTimeOffset orderDate {get;set;}
[JsonProperty(PropertyName = "RequiredDate")]
public DateTimeOffset requiredDate {get;set;}
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
[JsonProperty(PropertyName = "ShipperName")]
public string shipperName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Quantity")]
public short quantity {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Discount")]
public float discount {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ExtendedPrice")]
public decimal extendedPrice {get;set;}
[JsonProperty(PropertyName = "Freight")]
public decimal freight {get;set;}
}
public class Order_Details_Extended
{
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductID")]
public int productID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Quantity")]
public short quantity {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Discount")]
public float discount {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ExtendedPrice")]
public decimal extendedPrice {get;set;}
}
public class Order_Subtotal
{
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Subtotal")]
public decimal subtotal {get;set;}
}
public class Orders_Qry
{
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CustomerID")]
public string customerID {get;set;}
[JsonProperty(PropertyName = "EmployeeID")]
public int employeeID {get;set;}
[JsonProperty(PropertyName = "OrderDate")]
public DateTimeOffset orderDate {get;set;}
[JsonProperty(PropertyName = "RequiredDate")]
public DateTimeOffset requiredDate {get;set;}
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
[JsonProperty(PropertyName = "ShipVia")]
public int shipVia {get;set;}
[JsonProperty(PropertyName = "Freight")]
public decimal freight {get;set;}
[JsonProperty(PropertyName = "ShipName")]
public string shipName {get;set;}
[JsonProperty(PropertyName = "ShipAddress")]
public string shipAddress {get;set;}
[JsonProperty(PropertyName = "ShipCity")]
public string shipCity {get;set;}
[JsonProperty(PropertyName = "ShipRegion")]
public string shipRegion {get;set;}
[JsonProperty(PropertyName = "ShipPostalCode")]
public string shipPostalCode {get;set;}
[JsonProperty(PropertyName = "ShipCountry")]
public string shipCountry {get;set;}
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Address")]
public string address {get;set;}
[JsonProperty(PropertyName = "City")]
public string city {get;set;}
[JsonProperty(PropertyName = "Region")]
public string region {get;set;}
[JsonProperty(PropertyName = "PostalCode")]
public string postalCode {get;set;}
[JsonProperty(PropertyName = "Country")]
public string country {get;set;}
}
public class Product_Sales_for_1997
{
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductSales")]
public decimal productSales {get;set;}
}
public class Products_Above_Average_Price
{
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "UnitPrice")]
public decimal unitPrice {get;set;}
}
public class Products_by_Category
{
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "QuantityPerUnit")]
public string quantityPerUnit {get;set;}
[JsonProperty(PropertyName = "UnitsInStock")]
public short unitsInStock {get;set;}
[JsonProperty(PropertyName = "Discontinued")]
public bool discontinued {get;set;} //PrimaryKey not null
}
public class Sales_by_Category
{
[JsonProperty(PropertyName = "CategoryID")]
public int categoryID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CategoryName")]
public string categoryName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductName")]
public string productName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ProductSales")]
public decimal productSales {get;set;}
}
public class Sales_Totals_by_Amount
{
[JsonProperty(PropertyName = "SaleAmount")]
public decimal saleAmount {get;set;}
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "CompanyName")]
public string companyName {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
}
public class Summary_of_Sales_by_Quarter
{
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Subtotal")]
public decimal subtotal {get;set;}
}
public class Summary_of_Sales_by_Year
{
[JsonProperty(PropertyName = "ShippedDate")]
public DateTimeOffset shippedDate {get;set;}
[JsonProperty(PropertyName = "OrderID")]
public int orderID {get;set;} //PrimaryKey not null
[JsonProperty(PropertyName = "Subtotal")]
public decimal subtotal {get;set;}
}
}
- home
- Announcing V6.4.0
- Features
- Getting started with c# generation
- Http Connection
- Using Parameter file
- User Defined Attributes
- Controlling c# code generation
- Model Filter
- Enable Nullable Reference type of c# 8
- Class with Init-Only Properties (c# 9)
- Generating Constructor
- Record-Type (c# 9)
- Name Map
- Securing Password
- Using Proxy Server
- Using Plugin Attributes
- Developing with OData2Poco
- Examples in dotnetfiddle.net
- CommandLine-Reference
- AttributeExamples
- typescript generation
- OData with DTD section
- Help Screen
- How to
- New Feature 4.2.1
Samples of generated code: