Skip to content

Commit c8caa2c

Browse files
authored
Merge branch 'master' into master
2 parents 8383d4a + 91a4434 commit c8caa2c

File tree

101 files changed

+171347
-1825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+171347
-1825
lines changed

samples/applications/iot-smart-grid/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ To run this sample, you need the following prerequisites.
4545
<a name=run-this-sample></a>
4646

4747
## Run this sample
48+
1. Create a database with the name: PowerConsumption
49+
50+
2. Run the script setup-or-reset-demo.sql to create the DB Objects
51+
52+
3. Start the DataGenerator (WindowsForms: Client.exe OR Console: ConsoleClient.exe)application DemoWorkload.exe
53+
54+
4. Change the connection string in the configuration settings, if needed. By default, it points to the local default SQL Server instance with integrated authentication.
55+
56+
5. Load the Power BI Report (WindowsForms: Click on the lower left link, Console: Type REPORT)
57+
58+
-**or**-
59+
4860
1. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file.
4961

5062
2. From Visual Studio, open the **IoT-Smart-Grid.sln** file from the root directory.
File renamed without changes.

samples/databases/wide-world-importers/wwi-app/Controllers/ODataController.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-

2-
using Belgrade.SqlClient;
1+
using Belgrade.SqlClient;
32
using Microsoft.AspNetCore.Authorization;
43
using Microsoft.AspNetCore.Mvc;
54
using MsSql.RestApi;
@@ -20,7 +19,7 @@ public ODataController(ICommand sqlCommandService)
2019
}
2120

2221

23-
TableSpec salesorders = new TableSpec(schema: "WebApi", table: "SalesOrders", columns: "OrderID,OrderDate,CustomerPurchaseOrderNumber,ExpectedDeliveryDate,PickingCompletedWhen,CustomerID,CustomerName,PhoneNumber,FaxNumber,WebsiteURL,DeliveryLocation,SalesPerson,SalesPersonPhone,SalesPersonEmail");
22+
TableSpec salesorders = new TableSpec("WebApi","SalesOrders", "OrderID,OrderDate,CustomerPurchaseOrderNumber,ExpectedDeliveryDate,PickingCompletedWhen,CustomerID,CustomerName,PhoneNumber,FaxNumber,WebsiteURL,DeliveryLocation,SalesPerson,SalesPersonPhone,SalesPersonEmail");
2423

2524
[HttpGet]
2625
public async Task SalesOrders(int? id)

samples/databases/wide-world-importers/wwi-app/Controllers/ODataController.tt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
var json = o["ApiModel"].ToString();
77
TableDef[] config = Newtonsoft.Json.JsonConvert.DeserializeObject<TableDef[]>(json);
88
#>
9-
109
using Belgrade.SqlClient;
1110
using Microsoft.AspNetCore.Authorization;
1211
using Microsoft.AspNetCore.Mvc;

samples/databases/wide-world-importers/wwi-app/Controllers/TableController.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public async Task SalesOrders()
2020
{
2121
await this
2222
.Table(salesorders)
23-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
2423
.Process(this.sqlQuery);
2524
}
2625

@@ -29,7 +28,6 @@ public async Task PurchaseOrders()
2928
{
3029
await this
3130
.Table(purchaseorders)
32-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
3331
.Process(this.sqlQuery);
3432
}
3533

@@ -38,7 +36,6 @@ public async Task Invoices()
3836
{
3937
await this
4038
.Table(invoices)
41-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
4239
.Process(this.sqlQuery);
4340
}
4441

@@ -47,7 +44,6 @@ public async Task CustomerTransactions()
4744
{
4845
await this
4946
.Table(customertransactions)
50-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
5147
.Process(this.sqlQuery);
5248
}
5349

@@ -56,7 +52,6 @@ public async Task SupplierTransactions()
5652
{
5753
await this
5854
.Table(suppliertransactions)
59-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
6055
.Process(this.sqlQuery);
6156
}
6257

@@ -65,7 +60,6 @@ public async Task Customers()
6560
{
6661
await this
6762
.Table(customers)
68-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
6963
.Process(this.sqlQuery);
7064
}
7165

@@ -74,7 +68,6 @@ public async Task Suppliers()
7468
{
7569
await this
7670
.Table(suppliers)
77-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
7871
.Process(this.sqlQuery);
7972
}
8073

@@ -83,7 +76,6 @@ public async Task Countries()
8376
{
8477
await this
8578
.Table(countries)
86-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
8779
.Process(this.sqlQuery);
8880
}
8981

@@ -92,7 +84,6 @@ public async Task Cities()
9284
{
9385
await this
9486
.Table(cities)
95-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
9687
.Process(this.sqlQuery);
9788
}
9889

@@ -101,7 +92,6 @@ public async Task StateProvinces()
10192
{
10293
await this
10394
.Table(stateprovinces)
104-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
10595
.Process(this.sqlQuery);
10696
}
10797

@@ -110,7 +100,6 @@ public async Task StockItems()
110100
{
111101
await this
112102
.Table(stockitems)
113-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
114103
.Process(this.sqlQuery);
115104
}
116105
}

samples/databases/wide-world-importers/wwi-app/Controllers/TableController.tt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ namespace wwi_app.Controllers
3030
{
3131
await this
3232
.Table(<#= t.Table.ToLower() #>)
33-
//.OnError(e => { this.Response.Body.Dispose(); throw e; })
3433
.Process(this.sqlQuery);
3534
}
3635
<# } #>

samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ info:
1717
license:
1818
name: "Apache 2.0"
1919
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
20-
host: "localhost:64958"
20+
host: "localhost:64959"
2121
basePath: "/OData"
2222
tags:
2323
<# foreach(var t in config) {#>

0 commit comments

Comments
 (0)