Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 89 additions & 95 deletions dotnet/KeepTrack.sln
Original file line number Diff line number Diff line change
@@ -1,95 +1,89 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29409.12
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dal.MongoDb", "src\Dal.MongoDb\Dal.MongoDb.csproj", "{6A10979B-FBAE-488A-B5BC-0E45716DFE88}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{215584EC-8DFC-4DAD-B3A0-D419CEC24260}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Applications", "Applications", "{61C528CD-816E-4FC5-ADFA-C5C25A3C4052}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{59B2BDBC-F7DE-47F8-880E-248202630B1A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Car", "Car", "{A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Movie", "Movie", "{A6A8275A-6360-43E7-AB5A-D8A1E96BED06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "src\ConsoleApp\ConsoleApp.csproj", "{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CarComponent.Domain", "src\CarComponent.Domain\CarComponent.Domain.csproj", "{A2193B19-8191-4A28-9E64-23D9083A0531}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CarComponent.Infrastructure.MongoDb", "src\CarComponent.Infrastructure.MongoDb\CarComponent.Infrastructure.MongoDb.csproj", "{F7250DAA-718B-44FB-990B-AD7DFC488AA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{73A074B8-D41E-4CCD-AC4B-95DB716EC6C6}"
ProjectSection(SolutionItems) = preProject
CodeCoverage.runsettings = CodeCoverage.runsettings
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Api", "src\Api\Api.csproj", "{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarComponent.Domain.UnitTests", "test\CarComponent.Domain.UnitTests\CarComponent.Domain.UnitTests.csproj", "{2079D00A-8489-4A43-BC2E-0B7CFB772CE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovieComponent.Domain", "src\MovieComponent.Domain\MovieComponent.Domain.csproj", "{A08241ED-8F29-4DF7-9BCF-2E310A9C8187}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovieComponent.Infrastructure.MongoDb", "src\MovieComponent.Infrastructure.MongoDb\MovieComponent.Infrastructure.MongoDb.csproj", "{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Release|Any CPU.Build.0 = Release|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Release|Any CPU.Build.0 = Release|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Release|Any CPU.Build.0 = Release|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Release|Any CPU.Build.0 = Release|Any CPU
{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560}.Release|Any CPU.Build.0 = Release|Any CPU
{2079D00A-8489-4A43-BC2E-0B7CFB772CE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2079D00A-8489-4A43-BC2E-0B7CFB772CE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2079D00A-8489-4A43-BC2E-0B7CFB772CE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2079D00A-8489-4A43-BC2E-0B7CFB772CE7}.Release|Any CPU.Build.0 = Release|Any CPU
{A08241ED-8F29-4DF7-9BCF-2E310A9C8187}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A08241ED-8F29-4DF7-9BCF-2E310A9C8187}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A08241ED-8F29-4DF7-9BCF-2E310A9C8187}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A08241ED-8F29-4DF7-9BCF-2E310A9C8187}.Release|Any CPU.Build.0 = Release|Any CPU
{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6A10979B-FBAE-488A-B5BC-0E45716DFE88} = {215584EC-8DFC-4DAD-B3A0-D419CEC24260}
{A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B} = {59B2BDBC-F7DE-47F8-880E-248202630B1A}
{A6A8275A-6360-43E7-AB5A-D8A1E96BED06} = {59B2BDBC-F7DE-47F8-880E-248202630B1A}
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57} = {61C528CD-816E-4FC5-ADFA-C5C25A3C4052}
{A2193B19-8191-4A28-9E64-23D9083A0531} = {A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}
{F7250DAA-718B-44FB-990B-AD7DFC488AA7} = {A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}
{5B65EF04-3F7A-4042-8D8B-DFB3AD7CC560} = {61C528CD-816E-4FC5-ADFA-C5C25A3C4052}
{2079D00A-8489-4A43-BC2E-0B7CFB772CE7} = {A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}
{A08241ED-8F29-4DF7-9BCF-2E310A9C8187} = {A6A8275A-6360-43E7-AB5A-D8A1E96BED06}
{E7BCC402-E50E-4AA1-AA7C-1A9C95DBDB50} = {A6A8275A-6360-43E7-AB5A-D8A1E96BED06}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {876333E7-72D4-4F43-B6F9-9432CA2B7425}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29409.12
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dal.MongoDb", "src\Dal.MongoDb\Dal.MongoDb.csproj", "{6A10979B-FBAE-488A-B5BC-0E45716DFE88}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - Shared", "1 - Shared", "{215584EC-8DFC-4DAD-B3A0-D419CEC24260}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 - Applications", "3 - Applications", "{61C528CD-816E-4FC5-ADFA-C5C25A3C4052}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 - Components", "2 - Components", "{59B2BDBC-F7DE-47F8-880E-248202630B1A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Car", "Car", "{A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Movie", "Movie", "{A6A8275A-6360-43E7-AB5A-D8A1E96BED06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "src\ConsoleApp\ConsoleApp.csproj", "{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CarComponent.Domain", "src\CarComponent.Domain\CarComponent.Domain.csproj", "{A2193B19-8191-4A28-9E64-23D9083A0531}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CarComponent.Infrastructure.MongoDb", "src\CarComponent.Infrastructure.MongoDb\CarComponent.Infrastructure.MongoDb.csproj", "{F7250DAA-718B-44FB-990B-AD7DFC488AA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0 - Solution Items", "0 - Solution Items", "{73A074B8-D41E-4CCD-AC4B-95DB716EC6C6}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
CodeCoverage.runsettings = CodeCoverage.runsettings
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Api", "src\Api\Api.csproj", "{651432D5-8481-4807-A422-552EEB4DE8C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovieComponent.Domain", "src\MovieComponent.Domain\MovieComponent.Domain.csproj", "{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovieComponent.Infrastructure.MongoDb", "src\MovieComponent.Infrastructure.MongoDb\MovieComponent.Infrastructure.MongoDb.csproj", "{02479358-D65A-4EF1-BA14-BD21706FBA20}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A10979B-FBAE-488A-B5BC-0E45716DFE88}.Release|Any CPU.Build.0 = Release|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57}.Release|Any CPU.Build.0 = Release|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2193B19-8191-4A28-9E64-23D9083A0531}.Release|Any CPU.Build.0 = Release|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7250DAA-718B-44FB-990B-AD7DFC488AA7}.Release|Any CPU.Build.0 = Release|Any CPU
{651432D5-8481-4807-A422-552EEB4DE8C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{651432D5-8481-4807-A422-552EEB4DE8C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{651432D5-8481-4807-A422-552EEB4DE8C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{651432D5-8481-4807-A422-552EEB4DE8C2}.Release|Any CPU.Build.0 = Release|Any CPU
{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B}.Release|Any CPU.Build.0 = Release|Any CPU
{02479358-D65A-4EF1-BA14-BD21706FBA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02479358-D65A-4EF1-BA14-BD21706FBA20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02479358-D65A-4EF1-BA14-BD21706FBA20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02479358-D65A-4EF1-BA14-BD21706FBA20}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6A10979B-FBAE-488A-B5BC-0E45716DFE88} = {215584EC-8DFC-4DAD-B3A0-D419CEC24260}
{A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B} = {59B2BDBC-F7DE-47F8-880E-248202630B1A}
{A6A8275A-6360-43E7-AB5A-D8A1E96BED06} = {59B2BDBC-F7DE-47F8-880E-248202630B1A}
{3C4E6452-A0A7-4860-83F1-4AF7A0CF1E57} = {61C528CD-816E-4FC5-ADFA-C5C25A3C4052}
{A2193B19-8191-4A28-9E64-23D9083A0531} = {A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}
{F7250DAA-718B-44FB-990B-AD7DFC488AA7} = {A52EF787-A7DD-4F2F-99B1-9A62CBE1DE5B}
{651432D5-8481-4807-A422-552EEB4DE8C2} = {61C528CD-816E-4FC5-ADFA-C5C25A3C4052}
{FAD8CE20-6164-4986-B3C1-6DF1EFF3C58B} = {A6A8275A-6360-43E7-AB5A-D8A1E96BED06}
{02479358-D65A-4EF1-BA14-BD21706FBA20} = {A6A8275A-6360-43E7-AB5A-D8A1E96BED06}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {876333E7-72D4-4F43-B6F9-9432CA2B7425}
EndGlobalSection
EndGlobal
54 changes: 46 additions & 8 deletions dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,54 @@

## Dependencies

- SDK: .NET Core 3.0
- DB: MongoDB 4.2
- [.NET Core 3.1 SDK](dot.net)
- MongoDB 4.2 database
- Local server
- Docker

```bash
docker run --name mongodb422 -d -p 27017:27017 mongo
```

- MongoDB Atlas cluster

## Configuration

- Value for key `KeepTrack_MongoDbConnectionString`: .NET connection string to access MongoDB cluster, ideally set as an environment variable.
Key | Description | Default value
--- | ----------- | -------------
`Infrastructure:MongoDB:ConnectionString` | MongoDB connection string |
`Infrastructure:MongoDB:DatabaseName` | MongoDB connection string | inventory

This values can be easily provided as environment variables (replace ":" by "__") or by configuration (json).

## Build & debug

- Clone the solution

```bash
git clone https://github.com/devpro/keep-track.git
```

- Build the solution

```bash
dotnet build
```

- Run the tests

```bash
dotnet build
```

- Run the console application:

```bash
dotnet src\ConsoleApp\bin\Debug\netcoreapp3.1\KeepTrack.ConsoleApp.dll -a CarDemo
```

## Local run
- Run the web api application:

- Clone the solution: `git clone ...`
- Build the solution: `dotnet build`
- Run the console: `dotnet dotnet src\ConsoleApp\bin\Debug\netcoreapp3.0\KeepTrack.ConsoleApp.dll ...`
- Run the web api: `dotnet run --project src\Api`
```bash
dotnet run --project src\Api
```
18 changes: 9 additions & 9 deletions dotnet/src/Api/Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>KeepTrack.Api</AssemblyName>
<RootNamespace>KeepTrack.Api</RootNamespace>
<ProjectGuid>{651432D5-8481-4807-A422-552EEB4DE8C2}</ProjectGuid>
Expand All @@ -14,14 +14,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.0.0-rc4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.0.0" />
<PackageReference Include="Withywoods.Configuration" Version="1.1.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/Api/AppConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AppConfiguration(IConfiguration configurationRoot)
/// MongoDB connection string => secret!
/// This is really a sensitive information so better defined as an environment variable.
/// </summary>
public string ConnectionString => ConfigurationRoot.TryGetSection("KeepTrack_MongoDbConnectionString").Value;
public string ConnectionString => ConfigurationRoot.TryGetSection("Infrastructure:MongoDB:ConnectionString").Value;

/// <summary>
/// MongoDB collection name.
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/Api/Controllers/MovieController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace KeepTrack.Api.Controllers
[ApiController]
[Authorize]
[Route("api/movies")]
public class MovieController : KeepTrack.Api.Controllers.ControllerBase
public class MovieController : ControllerBase
{
private readonly IMapper _mapper;
private readonly IMovieRepository _movieRepository;
Expand Down
12 changes: 12 additions & 0 deletions dotnet/src/Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace KeepTrack.Api
/// </summary>
public class Startup
{
#region Private fields & constructor

private readonly AppConfiguration _configuration;

/// <summary>
Expand All @@ -34,6 +36,10 @@ public Startup(IConfiguration configuration)
_configuration = new AppConfiguration(configuration);
}

#endregion

#region Public methods

/// <summary>
/// Configure services.
/// </summary>
Expand Down Expand Up @@ -90,6 +96,10 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
});
}

#endregion

#region Private methods

private static void ConfigureAutoMapper(IServiceCollection serviceCollection)
{
var mappingConfig = new MapperConfiguration(x =>
Expand Down Expand Up @@ -159,5 +169,7 @@ private static void ConfigureSwagger(IServiceCollection serviceCollection, OpenA
c.IncludeXmlComments(xmlPath);
});
}

#endregion
}
}
2 changes: 1 addition & 1 deletion dotnet/src/ConsoleApp/AppConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public AppConfiguration(IConfigurationRoot configurationRoot)

#region IMongoDbConfiguration properties

public string ConnectionString => _configurationRoot.GetSection("KeepTrack_MongoDbConnectionString").Value;
public string ConnectionString => _configurationRoot.GetSection("Infrastructure:MongoDB:ConnectionString").Value;

public string DatabaseName => "inventory";

Expand Down
Loading