diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 75464ba..5c97b77 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,36 @@ { "version": "2.0.0", "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/src/InternshipSystem.Api/InternshipSystem.Api.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "--project", + "${workspaceFolder}/src/InternshipSystem.Api/InternshipSystem.Api.csproj", + "run", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, { "label": "build: api", "type": "docker-build", @@ -36,10 +66,6 @@ "down: api", "build: api" ], - "group": { - "kind": "build", - "isDefault": true - }, "problemMatcher": [] }, { diff --git a/src/InternshipSystem.Api/Controllers/AdminController.cs b/src/InternshipSystem.Api/Controllers/AdminController.cs index 9994aaa..062e7f8 100644 --- a/src/InternshipSystem.Api/Controllers/AdminController.cs +++ b/src/InternshipSystem.Api/Controllers/AdminController.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using Internship.Repository; +using InternshipSystem.Repository; using Microsoft.AspNetCore.Mvc; namespace Internship.Api.Controller diff --git a/src/InternshipSystem.Api/Startup.cs b/src/InternshipSystem.Api/Startup.cs index 871359e..be7ab2e 100644 --- a/src/InternshipSystem.Api/Startup.cs +++ b/src/InternshipSystem.Api/Startup.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.Reflection; -using Internship.Repository; using InternshipSystem.Repository; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -30,7 +29,7 @@ namespace InternshipSystem.Api var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); options.IncludeXmlComments(xmlPath); }) - .AddSingleton() + .AddScoped() .AddControllers() ; diff --git a/src/InternshipSystem.Repository/DatabaseFiller.cs b/src/InternshipSystem.Repository/DatabaseFiller.cs index 7f6d87a..a0b94d8 100644 --- a/src/InternshipSystem.Repository/DatabaseFiller.cs +++ b/src/InternshipSystem.Repository/DatabaseFiller.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using InternshipSystem.Core; -using InternshipSystem.Repository; -namespace Internship.Repository +namespace InternshipSystem.Repository { public class DatabaseFiller {