structured solution
This commit is contained in:
parent
f3ca76af46
commit
098bfa5cd1
@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ContentModelStore">
|
||||
<e p="C:\Users\Chika\.nuget\packages\microsoft.net.test.sdk\16.5.0\build\netcoreapp2.1" t="Include">
|
||||
<e p="Microsoft.NET.Test.Sdk.Program.cs" t="Include" />
|
||||
</e>
|
||||
<e p="C:\Users\Chika\.nuget\packages\microsoft.testplatform.testhost\16.5.0\build\netcoreapp2.1\x64\testhost.dll" t="Include" />
|
||||
<e p="C:\Users\Chika\.nuget\packages\microsoft.testplatform.testhost\16.5.0\build\netcoreapp2.1\x64\testhost.exe" t="Include" />
|
||||
<e p="C:\Users\Chika\.nuget\packages\xunit.runner.visualstudio\2.4.0\build\netcoreapp1.0\xunit.runner.reporters.netcoreapp10.dll" t="Include" />
|
||||
<e p="C:\Users\Chika\.nuget\packages\xunit.runner.visualstudio\2.4.0\build\netcoreapp1.0\xunit.runner.utility.netcoreapp10.dll" t="Include" />
|
||||
<e p="C:\Users\Chika\.nuget\packages\xunit.runner.visualstudio\2.4.0\build\netcoreapp1.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll" t="Include" />
|
||||
<e p="C:\Users\Chika\AppData\Local\JetBrains\Rider2020.2\extResources" t="IncludeRecursive" />
|
||||
<e p="C:\Users\Chika\AppData\Local\JetBrains\Rider2020.2\resharper-host\Local\Transient\Rider\v202\SolutionCaches\_EvoCalculator.Core.1747351465.00" t="ExcludeRecursive" />
|
||||
<e p="C:\Users\Chika\Projects\EvoCalculator.Core" t="IncludeFlat">
|
||||
@ -9,7 +17,9 @@
|
||||
<e p="appsettings.json" t="Include" />
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="Controllers" t="Include">
|
||||
<e p="WeatherForecastController.cs" t="Include" />
|
||||
<e p="v1" t="Include">
|
||||
<e p="WeatherForecastController.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
<e p="EvoCalculator.Core.csproj" t="IncludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
@ -24,9 +34,52 @@
|
||||
<e p="launchSettings.json" t="Include" />
|
||||
</e>
|
||||
<e p="Startup.cs" t="Include" />
|
||||
<e p="WeatherForecast.cs" t="Include" />
|
||||
</e>
|
||||
<e p="EvoCalculator.Core.Calculation" t="IncludeRecursive">
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="EvoCalculator.Core.Calculation.csproj" t="IncludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.1" t="Include">
|
||||
<e p="EvoCalculator.Core.Calculation.AssemblyInfo.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
<e p="EvoCalculator.Core.Models" t="IncludeRecursive">
|
||||
<e p="API" t="Include">
|
||||
<e p="Request" t="Include" />
|
||||
<e p="Response" t="Include" />
|
||||
</e>
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="Calculation" t="Include" />
|
||||
<e p="EvoCalculator.Core.Models.csproj" t="IncludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.1" t="Include">
|
||||
<e p="EvoCalculator.Core.Models.AssemblyInfo.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
<e p="Weather" t="Include">
|
||||
<e p="Interfaces" t="Include">
|
||||
<e p="IWeatherForecast.cs" t="Include" />
|
||||
</e>
|
||||
<e p="WeatherForecast.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
<e p="EvoCalculator.Core.sln" t="IncludeFlat" />
|
||||
<e p="EvoCalculator.Core.Tests" t="IncludeRecursive">
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="EvoCalculator.Core.Tests.csproj" t="IncludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.1" t="Include">
|
||||
<e p="EvoCalculator.Core.Tests.AssemblyInfo.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
<e p="packages" t="ExcludeRecursive" />
|
||||
</e>
|
||||
</component>
|
||||
|
||||
129
.idea/.idea.EvoCalculator.Core/.idea/workspace.xml
generated
129
.idea/.idea.EvoCalculator.Core/.idea/workspace.xml
generated
@ -1,5 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoGeneratedRunConfigurationManager">
|
||||
<projectFile>EvoCalculator.Core/EvoCalculator.Core.csproj</projectFile>
|
||||
</component>
|
||||
<component name="BranchesTreeState">
|
||||
<expand />
|
||||
<select>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
</select>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/EvoCalculator.Core.Calculation.csproj" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/EvoCalculator.Core.Models.csproj" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/EvoCalculator.Core.Tests.csproj" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.sln" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.sln" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core/Controllers/WeatherForecastController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core/Controllers/v1/WeatherForecastController.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core/EvoCalculator.Core.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core/EvoCalculator.Core.csproj" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core/Startup.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core/Startup.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core/WeatherForecast.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Weather/WeatherForecast.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/UnitTest1.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Class1.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Class1.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core/Controllers/WeatherForecastController.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Weather/WeatherForecast.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core/Startup.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core/Controllers/v2/WeatherForecastController.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core/Controllers/v3/WeatherForecastController.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core/Controllers/v1/WeatherForecastController.cs" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectId" id="1imEQedzOwq3NavnSUCC7bKWqbF" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
|
||||
<ConfirmationsSetting value="2" id="Add" />
|
||||
</component>
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
<property name="vue.rearranger.settings.migration" value="true" />
|
||||
</component>
|
||||
<component name="RunManager" selected=".NET Launch Settings Profile.EvoCalculator.Core">
|
||||
<configuration name="EvoCalculator.Core" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
|
||||
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/EvoCalculator.Core/EvoCalculator.Core.csproj" />
|
||||
@ -32,4 +95,70 @@
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="" />
|
||||
<created>1602504351800</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1602504351800</updated>
|
||||
<workItem from="1602504354370" duration="3857000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="null" />
|
||||
<component name="UnityUnitTestConfiguration" currentTestLauncher="NUnit" />
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="1077" y="489" key="#Web_Browsers" timestamp="1602508282238">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="1077" y="489" key="#Web_Browsers/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508282238" />
|
||||
<state x="734" y="355" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1602508288549">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="734" y="355" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508288549" />
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.bottom" timestamp="1602508304223">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508304223" />
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.center" timestamp="1602508304222">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508304222" />
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.left" timestamp="1602508304221">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508304221" />
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.right" timestamp="1602508304222">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="185" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508304222" />
|
||||
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size" timestamp="1602504924550">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602504924550" />
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog" timestamp="1602505640103">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602505640103" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
13
EvoCalculator.Core.Models/EvoCalculator.Core.Models.csproj
Normal file
13
EvoCalculator.Core.Models/EvoCalculator.Core.Models.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="API\Request" />
|
||||
<Folder Include="API\Response" />
|
||||
<Folder Include="Calculation" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace EvoCalculator.Core.Models.Weather.Interfaces
|
||||
{
|
||||
public interface IWeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public int TemperatureF { get; }
|
||||
public string Summary { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using EvoCalculator.Core.Models.Weather.Interfaces;
|
||||
|
||||
namespace EvoCalculator.Core
|
||||
namespace EvoCalculator.Core.Models.Weather
|
||||
{
|
||||
public class WeatherForecast
|
||||
public class WeatherForecast:IWeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
16
EvoCalculator.Core.Tests/EvoCalculator.Core.Tests.csproj
Normal file
16
EvoCalculator.Core.Tests/EvoCalculator.Core.Tests.csproj
Normal file
@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -2,6 +2,12 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvoCalculator.Core", "EvoCalculator.Core\EvoCalculator.Core.csproj", "{D1AA257A-BA2B-44FD-85E8-F4813B1A453C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvoCalculator.Core.Calculation", "EvoCalculator.Core.Calculation\EvoCalculator.Core.Calculation.csproj", "{07646F9C-F060-4EF5-AEA6-CA88D6CD752D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvoCalculator.Core.Tests", "EvoCalculator.Core.Tests\EvoCalculator.Core.Tests.csproj", "{97CF5335-8641-4A4F-A6CD-641BF8655B53}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvoCalculator.Core.Models", "EvoCalculator.Core.Models\EvoCalculator.Core.Models.csproj", "{768ED2B0-5BCE-484F-873B-ADF4DC22687F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -12,5 +18,17 @@ Global
|
||||
{D1AA257A-BA2B-44FD-85E8-F4813B1A453C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D1AA257A-BA2B-44FD-85E8-F4813B1A453C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D1AA257A-BA2B-44FD-85E8-F4813B1A453C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{07646F9C-F060-4EF5-AEA6-CA88D6CD752D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07646F9C-F060-4EF5-AEA6-CA88D6CD752D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07646F9C-F060-4EF5-AEA6-CA88D6CD752D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07646F9C-F060-4EF5-AEA6-CA88D6CD752D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{97CF5335-8641-4A4F-A6CD-641BF8655B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{97CF5335-8641-4A4F-A6CD-641BF8655B53}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{97CF5335-8641-4A4F-A6CD-641BF8655B53}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{97CF5335-8641-4A4F-A6CD-641BF8655B53}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{768ED2B0-5BCE-484F-873B-ADF4DC22687F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{768ED2B0-5BCE-484F-873B-ADF4DC22687F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{768ED2B0-5BCE-484F-873B-ADF4DC22687F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{768ED2B0-5BCE-484F-873B-ADF4DC22687F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using EvoCalculator.Core.Models.Weather;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EvoCalculator.Core.Controllers
|
||||
namespace EvoCalculator.Core.Controllers.V1
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
[ApiVersion("1.0")]
|
||||
[Route("api/v{version:apiVersion}/[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
@ -22,7 +23,7 @@ namespace EvoCalculator.Core.Controllers
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
@ -4,5 +4,13 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Models\EvoCalculator.Core.Models.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
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.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EvoCalculator.Core
|
||||
{
|
||||
@ -26,6 +20,12 @@ namespace EvoCalculator.Core
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
|
||||
services.AddApiVersioning(opt => {
|
||||
opt.DefaultApiVersion = new ApiVersion(1, 0);
|
||||
opt.AssumeDefaultVersionWhenUnspecified = true;
|
||||
opt.ReportApiVersions = true;
|
||||
});
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user