Merge pull request #715 from JocaPC/master

Updated WWI App
This commit is contained in:
Jovan Popovic (MSFT)
2020-01-15 23:50:00 +01:00
committed by GitHub
7 changed files with 188 additions and 202 deletions
@@ -1,5 +1,4 @@
using Belgrade.SqlClient;
using Belgrade.SqlClient;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MsSql.RestApi;
@@ -20,7 +19,7 @@ namespace wwi_app.Controllers
}
TableSpec salesorders = new TableSpec(schema: "WebApi", table: "SalesOrders", columns: "OrderID,OrderDate,CustomerPurchaseOrderNumber,ExpectedDeliveryDate,PickingCompletedWhen,CustomerID,CustomerName,PhoneNumber,FaxNumber,WebsiteURL,DeliveryLocation,SalesPerson,SalesPersonPhone,SalesPersonEmail");
TableSpec salesorders = new TableSpec("WebApi","SalesOrders", "OrderID,OrderDate,CustomerPurchaseOrderNumber,ExpectedDeliveryDate,PickingCompletedWhen,CustomerID,CustomerName,PhoneNumber,FaxNumber,WebsiteURL,DeliveryLocation,SalesPerson,SalesPersonPhone,SalesPersonEmail");
[HttpGet]
public async Task SalesOrders(int? id)
@@ -6,7 +6,6 @@
var json = o["ApiModel"].ToString();
TableDef[] config = Newtonsoft.Json.JsonConvert.DeserializeObject<TableDef[]>(json);
#>
using Belgrade.SqlClient;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -20,7 +20,6 @@ namespace wwi_app.Controllers
{
await this
.Table(salesorders)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -29,7 +28,6 @@ namespace wwi_app.Controllers
{
await this
.Table(purchaseorders)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -38,7 +36,6 @@ namespace wwi_app.Controllers
{
await this
.Table(invoices)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -47,7 +44,6 @@ namespace wwi_app.Controllers
{
await this
.Table(customertransactions)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -56,7 +52,6 @@ namespace wwi_app.Controllers
{
await this
.Table(suppliertransactions)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -65,7 +60,6 @@ namespace wwi_app.Controllers
{
await this
.Table(customers)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -74,7 +68,6 @@ namespace wwi_app.Controllers
{
await this
.Table(suppliers)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -83,7 +76,6 @@ namespace wwi_app.Controllers
{
await this
.Table(countries)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -92,7 +84,6 @@ namespace wwi_app.Controllers
{
await this
.Table(cities)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -101,7 +92,6 @@ namespace wwi_app.Controllers
{
await this
.Table(stateprovinces)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
@@ -110,7 +100,6 @@ namespace wwi_app.Controllers
{
await this
.Table(stockitems)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
}
@@ -30,7 +30,6 @@ namespace wwi_app.Controllers
{
await this
.Table(<#= t.Table.ToLower() #>)
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
.Process(this.sqlQuery);
}
<# } #>
@@ -17,7 +17,7 @@ info:
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "localhost:64958"
host: "localhost:64959"
basePath: "/OData"
tags:
<# foreach(var t in config) {#>
File diff suppressed because it is too large Load Diff