i had to.

This commit is contained in:
David Renner 2020-05-28 15:25:12 +02:00
commit 3d16616fa0
13 changed files with 17 additions and 1203 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,3 +0,0 @@
{
"CurrentProjectSetting": null
}

Binary file not shown.

View File

@ -4,5 +4,10 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.4" />
</ItemGroup>
</Project>

View File

@ -10,4 +10,4 @@ namespace BuecherwurmAPI.Models
public string Customer { get; set; }
public bool Returned { get; set; }
}
}
}

View File

@ -12,7 +12,7 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"launchUrl": "api",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
@ -20,7 +20,7 @@
"BuecherwurmAPI": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"launchUrl": "api",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"

View File

@ -2,6 +2,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using BuecherwurmAPI.Data;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
@ -26,6 +28,13 @@ namespace BuecherwurmAPI
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
// Adds a service that is created once per connection.
// It takes an interface and a specific implementation.
// That allows to swap the implementation easily.
services.AddScoped<ILendRepo, MockLendRepo>();
services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

View File

@ -1,67 +0,0 @@
{
"format": 1,
"restore": {
"/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj": {}
},
"projects": {
"/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj",
"projectName": "BuecherwurmAPI",
"projectPath": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj",
"packagesPath": "/home/js/.nuget/packages/",
"outputPath": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/js/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[3.1.2, 3.1.2]"
}
],
"frameworkReferences": {
"Microsoft.AspNetCore.App": {
"privateAssets": "none"
},
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/3.1.300/RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/js/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/js/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.6.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

View File

@ -1,72 +0,0 @@
{
"version": 3,
"targets": {
".NETCoreApp,Version=v3.1": {}
},
"libraries": {},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": []
},
"packageFolders": {
"/home/js/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj",
"projectName": "BuecherwurmAPI",
"projectPath": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj",
"packagesPath": "/home/js/.nuget/packages/",
"outputPath": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/js/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[3.1.2, 3.1.2]"
}
],
"frameworkReferences": {
"Microsoft.AspNetCore.App": {
"privateAssets": "none"
},
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/3.1.300/RuntimeIdentifierGraph.json"
}
}
}
}

View File

@ -1,10 +0,0 @@
{
"version": 2,
"dgSpecHash": "DQHTkigAmzaLDZvres1QqICGpp078kH+e2RcIw20S2aZ61FIcBBy9GnDIw6JTzZ4/RxJvQ1+WRFn2orctypbfA==",
"success": true,
"projectFilePath": "/home/js/git/BuecherwurmAPI/BuecherwurmAPI/BuecherwurmAPI.csproj",
"expectedPackageFiles": [
"/home/js/.nuget/packages/microsoft.aspnetcore.app.ref/3.1.2/microsoft.aspnetcore.app.ref.3.1.2.nupkg.sha512"
],
"logs": []
}