Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6e274e
commit b4ef578
Showing
16 changed files
with
349 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
CompanyName/CompanyName.Api.Test/CompanyName.Api.Test.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.2</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="nunit" Version="3.11.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="3.11.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using NUnit.Framework; | ||
|
||
namespace Tests | ||
{ | ||
public class Tests | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void Test1() | ||
{ | ||
Assert.Pass(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.2</TargetFramework> | ||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.App" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
</Project> |
45 changes: 45 additions & 0 deletions
45
CompanyName/CompanyName.Api/Controllers/ValuesController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace CompanyName.Api.Controllers | ||
{ | ||
[Route("api/[controller]")] | ||
[ApiController] | ||
public class ValuesController : ControllerBase | ||
{ | ||
// GET api/values | ||
[HttpGet] | ||
public ActionResult<IEnumerable<string>> Get() | ||
{ | ||
return new string[] { "value1", "value2" }; | ||
} | ||
|
||
// GET api/values/5 | ||
[HttpGet("{id}")] | ||
public ActionResult<string> Get(int id) | ||
{ | ||
return "value"; | ||
} | ||
|
||
// POST api/values | ||
[HttpPost] | ||
public void Post([FromBody] string value) | ||
{ | ||
} | ||
|
||
// PUT api/values/5 | ||
[HttpPut("{id}")] | ||
public void Put(int id, [FromBody] string value) | ||
{ | ||
} | ||
|
||
// DELETE api/values/5 | ||
[HttpDelete("{id}")] | ||
public void Delete(int id) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace CompanyName.Api | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateWebHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | ||
WebHost.CreateDefaultBuilder(args) | ||
.UseStartup<Startup>(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
CompanyName/CompanyName.Api/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/launchsettings.json", | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:54284", | ||
"sslPort": 44350 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"CompanyName.Api": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"applicationUrl": "https://localhost:5001;http://localhost:5000", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.AspNetCore.HttpsPolicy; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace CompanyName.Api | ||
{ | ||
public class Startup | ||
{ | ||
public Startup(IConfiguration configuration) | ||
{ | ||
Configuration = configuration; | ||
} | ||
|
||
public IConfiguration Configuration { get; } | ||
|
||
// This method gets called by the runtime. Use this method to add services to the container. | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); | ||
} | ||
|
||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | ||
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | ||
{ | ||
if (env.IsDevelopment()) | ||
{ | ||
app.UseDeveloperExceptionPage(); | ||
} | ||
else | ||
{ | ||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. | ||
app.UseHsts(); | ||
} | ||
|
||
app.UseHttpsRedirection(); | ||
app.UseMvc(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Debug", | ||
"System": "Information", | ||
"Microsoft": "Information" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
21 changes: 21 additions & 0 deletions
21
CompanyName/CompanyName.Entities/CompanyName.Entities.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Entities\" /> | ||
<Folder Include="Migrations\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
</Project> |
10 changes: 10 additions & 0 deletions
10
CompanyName/CompanyName.Entities/Data/ApplicationDbContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace CompanyName.Entities.Data | ||
{ | ||
public class ApplicationDbContext | ||
{ | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
CompanyName/CompanyName.Repository/CompanyName.Repository.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.28307.572 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App", "App", "{F422D401-ABDA-4F21-BBCA-5023E3671549}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Business", "Business", "{E43EA0D5-8A67-4D60-BF29-D2470F386904}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{DAD037AA-45A3-47E6-A65F-C1D8C45295B8}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{8B72B9AF-0E1B-45FA-A06F-B4EA9FA08034}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{73F3021B-1ADF-46CC-BDDF-132CAE3D18AA}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Business", "CompanyName.Business\CompanyName.Business.csproj", "{D834386D-29DA-49B9-9569-239F9EA5B789}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Domain", "CompanyName.Domain\CompanyName.Domain.csproj", "{293E6ECC-0A4F-4400-9914-1C26BB11A646}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Entities", "CompanyName.Entities\CompanyName.Entities.csproj", "{22674611-82C6-4B49-B5C7-133232197323}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Repository", "CompanyName.Repository\CompanyName.Repository.csproj", "{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Core", "CompanyName.Core\CompanyName.Core.csproj", "{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Api.Test", "CompanyName.Api.Test\CompanyName.Api.Test.csproj", "{87C37A40-77F7-417D-AAC8-06F399DDE3AE}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.Api", "CompanyName.Api\CompanyName.Api.csproj", "{87FCEB63-C605-4805-B821-84C5FE6985D0}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D834386D-29DA-49B9-9569-239F9EA5B789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D834386D-29DA-49B9-9569-239F9EA5B789}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D834386D-29DA-49B9-9569-239F9EA5B789}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D834386D-29DA-49B9-9569-239F9EA5B789}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{293E6ECC-0A4F-4400-9914-1C26BB11A646}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{293E6ECC-0A4F-4400-9914-1C26BB11A646}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{293E6ECC-0A4F-4400-9914-1C26BB11A646}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{293E6ECC-0A4F-4400-9914-1C26BB11A646}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{22674611-82C6-4B49-B5C7-133232197323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{22674611-82C6-4B49-B5C7-133232197323}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{22674611-82C6-4B49-B5C7-133232197323}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{22674611-82C6-4B49-B5C7-133232197323}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{87C37A40-77F7-417D-AAC8-06F399DDE3AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{87C37A40-77F7-417D-AAC8-06F399DDE3AE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{87C37A40-77F7-417D-AAC8-06F399DDE3AE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{87C37A40-77F7-417D-AAC8-06F399DDE3AE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{87FCEB63-C605-4805-B821-84C5FE6985D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{87FCEB63-C605-4805-B821-84C5FE6985D0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{87FCEB63-C605-4805-B821-84C5FE6985D0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{87FCEB63-C605-4805-B821-84C5FE6985D0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{D834386D-29DA-49B9-9569-239F9EA5B789} = {E43EA0D5-8A67-4D60-BF29-D2470F386904} | ||
{293E6ECC-0A4F-4400-9914-1C26BB11A646} = {DAD037AA-45A3-47E6-A65F-C1D8C45295B8} | ||
{22674611-82C6-4B49-B5C7-133232197323} = {DAD037AA-45A3-47E6-A65F-C1D8C45295B8} | ||
{C5AD03AD-4D5C-4B69-903C-FA6ED590E35E} = {DAD037AA-45A3-47E6-A65F-C1D8C45295B8} | ||
{D9ED3CCB-0611-4BB0-8C65-B6E5CE2EA3AC} = {8B72B9AF-0E1B-45FA-A06F-B4EA9FA08034} | ||
{87C37A40-77F7-417D-AAC8-06F399DDE3AE} = {73F3021B-1ADF-46CC-BDDF-132CAE3D18AA} | ||
{87FCEB63-C605-4805-B821-84C5FE6985D0} = {F422D401-ABDA-4F21-BBCA-5023E3671549} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {7748A505-07A2-4AF2-9CB4-FCEB790A2588} | ||
EndGlobalSection | ||
EndGlobal |