Skip to content
This repository was archived by the owner on Jan 3, 2022. It is now read-only.

Commit 352ed4e

Browse files
authored
Add files via upload
1 parent 9b51186 commit 352ed4e

17 files changed

+512
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.9" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.9" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.9" />
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.9">
12+
<PrivateAssets>all</PrivateAssets>
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
</PackageReference>
15+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
16+
</ItemGroup>
17+
18+
19+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<_SelectedScaffolderID>ApiControllerWithContextScaffolder</_SelectedScaffolderID>
5+
<_SelectedScaffolderCategoryPath>root/Common</_SelectedScaffolderCategoryPath>
6+
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
7+
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
8+
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
9+
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
10+
<WebStackScaffolding_LayoutPageFile />
11+
<WebStackScaffolding_DbContextTypeFullName>BackEnd2.Models.TodoContext</WebStackScaffolding_DbContextTypeFullName>
12+
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
13+
</PropertyGroup>
14+
</Project>

Application/WebAPI-C#/BackEnd2.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30611.23
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackEnd2", "BackEnd2.csproj", "{8F9882D7-D2E8-4EE9-94B2-5EAD37EE0A3D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{8F9882D7-D2E8-4EE9-94B2-5EAD37EE0A3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{8F9882D7-D2E8-4EE9-94B2-5EAD37EE0A3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{8F9882D7-D2E8-4EE9-94B2-5EAD37EE0A3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{8F9882D7-D2E8-4EE9-94B2-5EAD37EE0A3D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {05EB348E-CE33-4E3D-9B73-84CA4DF88587}
24+
EndGlobalSection
25+
EndGlobal

Application/WebAPI-C#/Program.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.Hosting;
8+
using Microsoft.Extensions.Logging;
9+
10+
namespace BackEnd2
11+
{
12+
public class Program
13+
{
14+
public static void Main(string[] args)
15+
{
16+
CreateHostBuilder(args).Build().Run();
17+
}
18+
19+
public static IHostBuilder CreateHostBuilder(string[] args) =>
20+
Host.CreateDefaultBuilder(args)
21+
.ConfigureWebHostDefaults(webBuilder =>
22+
{
23+
webBuilder.UseStartup<Startup>();
24+
});
25+
}
26+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "http://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:65384",
8+
"sslPort": 44388
9+
}
10+
},
11+
"profiles": {
12+
"IIS Express": {
13+
"commandName": "IISExpress",
14+
"launchBrowser": true,
15+
"environmentVariables": {
16+
"ASPNETCORE_ENVIRONMENT": "Development"
17+
}
18+
},
19+
"BackEnd2": {
20+
"commandName": "Project",
21+
"launchBrowser": true,
22+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
23+
"environmentVariables": {
24+
"ASPNETCORE_ENVIRONMENT": "Development"
25+
}
26+
}
27+
}
28+
}

Application/WebAPI-C#/Startup.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using Microsoft.AspNetCore.Builder;
2+
using Microsoft.AspNetCore.Hosting;
3+
using Microsoft.Extensions.Configuration;
4+
using Microsoft.Extensions.DependencyInjection;
5+
using Microsoft.Extensions.Hosting;
6+
using BackEnd2.Models;
7+
using Microsoft.EntityFrameworkCore;
8+
9+
namespace BackEnd2
10+
{
11+
public class Startup
12+
{
13+
public Startup(IConfiguration configuration)
14+
{
15+
Configuration = configuration;
16+
}
17+
18+
public IConfiguration Configuration { get; }
19+
20+
// This method gets called by the runtime. Use this method to add services to the container.
21+
public void ConfigureServices(IServiceCollection services)
22+
{
23+
services.AddDbContext<TodoContext>(opt =>
24+
opt.UseInMemoryDatabase("TodoList"));
25+
services.AddControllers();
26+
}
27+
28+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
29+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
30+
{
31+
if (env.IsDevelopment())
32+
{
33+
app.UseDeveloperExceptionPage();
34+
}
35+
app.UseDefaultFiles();
36+
37+
app.UseStaticFiles();
38+
39+
app.UseHttpsRedirection();
40+
41+
app.UseRouting();
42+
43+
app.UseAuthorization();
44+
45+
app.UseEndpoints(endpoints =>
46+
{
47+
endpoints.MapControllers();
48+
});
49+
}
50+
}
51+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
3+
namespace BackEnd2
4+
{
5+
public class WeatherForecast
6+
{
7+
public DateTime Date { get; set; }
8+
9+
public int TemperatureC { get; set; }
10+
11+
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
12+
13+
public string Summary { get; set; }
14+
}
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
7+
}
8+
}
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
7+
}
8+
},
9+
"AllowedHosts": "*"
10+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"format": 1,
3+
"restore": {
4+
"C:\\Users\\Valued Customer\\source\\repos\\BackEnd2\\BackEnd2.csproj": {}
5+
},
6+
"projects": {
7+
"C:\\Users\\Valued Customer\\source\\repos\\BackEnd2\\BackEnd2.csproj": {
8+
"version": "1.0.0",
9+
"restore": {
10+
"projectUniqueName": "C:\\Users\\Valued Customer\\source\\repos\\BackEnd2\\BackEnd2.csproj",
11+
"projectName": "BackEnd2",
12+
"projectPath": "C:\\Users\\Valued Customer\\source\\repos\\BackEnd2\\BackEnd2.csproj",
13+
"packagesPath": "C:\\Users\\Valued Customer\\.nuget\\packages\\",
14+
"outputPath": "C:\\Users\\Valued Customer\\source\\repos\\BackEnd2\\obj\\",
15+
"projectStyle": "PackageReference",
16+
"fallbackFolders": [
17+
"C:\\Microsoft\\Xamarin\\NuGet\\"
18+
],
19+
"configFilePaths": [
20+
"C:\\Users\\Valued Customer\\AppData\\Roaming\\NuGet\\NuGet.Config",
21+
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
22+
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
23+
],
24+
"originalTargetFrameworks": [
25+
"netcoreapp3.1"
26+
],
27+
"sources": {
28+
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
29+
"https://api.nuget.org/v3/index.json": {}
30+
},
31+
"frameworks": {
32+
"netcoreapp3.1": {
33+
"projectReferences": {}
34+
}
35+
},
36+
"warningProperties": {
37+
"warnAsError": [
38+
"NU1605"
39+
]
40+
}
41+
},
42+
"frameworks": {
43+
"netcoreapp3.1": {
44+
"dependencies": {
45+
"Microsoft.EntityFrameworkCore.InMemory": {
46+
"target": "Package",
47+
"version": "[3.1.9, )"
48+
},
49+
"Microsoft.EntityFrameworkCore.SqlServer": {
50+
"target": "Package",
51+
"version": "[3.1.9, )"
52+
},
53+
"Microsoft.EntityFrameworkCore.Sqlite": {
54+
"target": "Package",
55+
"version": "[3.1.9, )"
56+
},
57+
"Microsoft.EntityFrameworkCore.Tools": {
58+
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
59+
"suppressParent": "All",
60+
"target": "Package",
61+
"version": "[3.1.9, )"
62+
},
63+
"Microsoft.VisualStudio.Web.CodeGeneration.Design": {
64+
"target": "Package",
65+
"version": "[3.1.4, )"
66+
}
67+
},
68+
"imports": [
69+
"net461",
70+
"net462",
71+
"net47",
72+
"net471",
73+
"net472",
74+
"net48"
75+
],
76+
"assetTargetFallback": true,
77+
"warn": true,
78+
"frameworkReferences": {
79+
"Microsoft.AspNetCore.App": {
80+
"privateAssets": "none"
81+
},
82+
"Microsoft.NETCore.App": {
83+
"privateAssets": "all"
84+
}
85+
},
86+
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.403\\RuntimeIdentifierGraph.json"
87+
}
88+
}
89+
}
90+
}
91+
}

0 commit comments

Comments
 (0)