Skip to content

Commit b28d37c

Browse files
Minor changes - Working docker-compose up on Docker Linux
1 parent 9ede5f0 commit b28d37c

8 files changed

Lines changed: 64 additions & 60 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ services:
2626
image: eshop/ordering.api
2727
environment:
2828
- ConnectionString=TBD
29-
expose:
30-
- "80"
3129
ports:
3230
- "81:80"
3331
extra_hosts:

src/Console/eShopConsole/Program.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,9 @@ public static void Main(string[] args)
6262
.Include(o => o.ShippingAddress)
6363
.Include(o => o.BillingAddress)
6464
.ToList();
65-
//Could be using .Load() if you don't want to create a List
66-
67-
//OTHER SAMPLE
68-
//var company = context.Companies
69-
// .Include(co => co.Employees).ThenInclude(emp => emp.Employee_Car)
70-
// .Include(co => co.Employees).ThenInclude(emp => emp.Employee_Country)
71-
// .FirstOrDefault(co => co.companyID == companyID);
72-
73-
//Assert when running test with a clean In-Memory DB
74-
//Assert.Equal(1, context.Orders.Count());
7565

7666
string cityName = orders.First<Order>().ShippingAddress.City;
77-
Console.WriteLine(cityName);
67+
Console.WriteLine("City name retreived from SQL Server: "+cityName);
7868
}
7969
}
8070
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": ".NET Core Launch (web)",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"preLaunchTask": "build",
9+
"program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.0\\Ordering.API.dll",
10+
"args": [],
11+
"cwd": "${workspaceRoot}",
12+
"stopAtEntry": false,
13+
"launchBrowser": {
14+
"enabled": true,
15+
"args": "${auto-detect-url}",
16+
"windows": {
17+
"command": "cmd.exe",
18+
"args": "/C start ${auto-detect-url}"
19+
},
20+
"osx": {
21+
"command": "open"
22+
},
23+
"linux": {
24+
"command": "xdg-open"
25+
}
26+
},
27+
"env": {
28+
"ASPNETCORE_ENVIRONMENT": "Development"
29+
},
30+
"sourceFileMap": {
31+
"/Views": "${workspaceRoot}/Views"
32+
}
33+
},
34+
{
35+
"name": ".NET Core Attach",
36+
"type": "coreclr",
37+
"request": "attach",
38+
"processId": "${command.pickProcess}"
39+
}
40+
]
41+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "dotnet",
4+
"isShellCommand": true,
5+
"args": [],
6+
"tasks": [
7+
{
8+
"taskName": "build",
9+
"args": [
10+
"${workspaceRoot}\\project.json"
11+
],
12+
"isBuildCommand": true,
13+
"problemMatcher": "$msCompile"
14+
}
15+
]
16+
}

src/Services/Ordering/Ordering.API/Controllers/ValuesController.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/Services/Ordering/Ordering.API/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Other .NET images
33
# FROM microsoft/dotnet:1.0.0-preview2-sdk
44
# FROM microsoft/dotnet:1.0.0-core
5+
# FROM microsoft/aspnetcore
6+
# FROM microsoft/dotnet:1.0.0-preview2-windowsservercore-sdk
57

68
WORKDIR /app
79
EXPOSE 80

src/Services/Ordering/Ordering.API/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static void Main(string[] args)
1717
.UseContentRoot(Directory.GetCurrentDirectory())
1818
.UseIISIntegration()
1919
.UseStartup<Startup>()
20+
//.UseUrls("http://localhost:5555") //Just for KESTREL
2021
.Build();
2122

2223
host.Run();

src/Services/Ordering/Ordering.API/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
1818
"Microsoft.EntityFrameworkCore": "1.0.0",
1919
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.0",
20-
"Ordering.Domain": "1.0.0-*",
21-
"Ordering.SqlData": "1.0.0-*",
2220
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
23-
"Microsoft.AspNetCore.Diagnostics": "1.0.0"
21+
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
22+
"Ordering.Domain": "1.0.0-*",
23+
"Ordering.SqlData": "1.0.0-*"
2424
},
2525
"tools": {
2626
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",

0 commit comments

Comments
 (0)