Update Config API
continuous-integration/drone/push Build is failing Details

master
Louwar 2 years ago
parent a83817cc10
commit 00f4536d2c

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@ -7,15 +7,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EntityFramework\EFlib\EFlib.csproj" />
<ProjectReference Include="..\EntityFramework\EFManager\EFManager.csproj" />
<ProjectReference Include="..\Model\Model.csproj" />
<ProjectReference Include="..\Stubs\StubLib\StubLib.csproj" />
</ItemGroup>
</Project>

@ -1,17 +1,24 @@
using EFlib;
using EFManager;
using Microsoft.EntityFrameworkCore;
using Model;
using StubLib;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
var connectionString = builder.Configuration.GetConnectionString("SQLiteContext");
builder.Services.AddDbContext<SQLiteContext>(options => options.UseSqlite(connectionString), ServiceLifetime.Singleton);
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<IDataManager, ManagerData>();
var app = builder.Build();
app?.Services?.GetService<SQLiteContext>()?.Database.EnsureCreated();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{

@ -4,8 +4,8 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:44020",
"sslPort": 44337
"applicationUrl": "http://localhost:28574",
"sslPort": 44383
}
},
"profiles": {
@ -14,7 +14,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7175;http://localhost:5048",
"applicationUrl": "https://localhost:7281;http://localhost:5051",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
@ -26,6 +26,12 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"useSSL": true
}
}
}

@ -4,5 +4,8 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"SQLiteContext": "Data Source=projet.dbloulou.db"
}
}

@ -5,5 +5,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"SQLiteContext": "Data Source=projet.dbloulou.db"
},
"AllowedHosts": "*"
}

@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "Shared\Shared.csproj", "{3B720C0C-53FE-4642-A2DB-87FD8634CD74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API", "API\API.csproj", "{37E43647-A760-467F-A3C3-71E25149D1BF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3EADD82A-15CF-40CC-BF4F-82F5385676A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestEF", "Tests\TestEF\TestEF.csproj", "{5DEC05D8-59AA-4DD9-AD53-07A08C1EC0EC}"
@ -35,7 +33,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleEF", "EntityFramewor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleTests", "ConsoleTests\ConsoleTests.csproj", "{2421A321-D552-421B-94A5-92B9C34678CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApi", "ConsoleApi\ConsoleApi.csproj", "{B30F9603-22B5-46EE-B617-44C25C4A207E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApi", "ConsoleApi\ConsoleApi.csproj", "{B30F9603-22B5-46EE-B617-44C25C4A207E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{EE27B518-574C-4691-9A0A-AD83D73B2145}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -51,10 +51,6 @@ Global
{3B720C0C-53FE-4642-A2DB-87FD8634CD74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B720C0C-53FE-4642-A2DB-87FD8634CD74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B720C0C-53FE-4642-A2DB-87FD8634CD74}.Release|Any CPU.Build.0 = Release|Any CPU
{37E43647-A760-467F-A3C3-71E25149D1BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37E43647-A760-467F-A3C3-71E25149D1BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37E43647-A760-467F-A3C3-71E25149D1BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37E43647-A760-467F-A3C3-71E25149D1BF}.Release|Any CPU.Build.0 = Release|Any CPU
{5DEC05D8-59AA-4DD9-AD53-07A08C1EC0EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DEC05D8-59AA-4DD9-AD53-07A08C1EC0EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DEC05D8-59AA-4DD9-AD53-07A08C1EC0EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -99,6 +95,10 @@ Global
{B30F9603-22B5-46EE-B617-44C25C4A207E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B30F9603-22B5-46EE-B617-44C25C4A207E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B30F9603-22B5-46EE-B617-44C25C4A207E}.Release|Any CPU.Build.0 = Release|Any CPU
{EE27B518-574C-4691-9A0A-AD83D73B2145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE27B518-574C-4691-9A0A-AD83D73B2145}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE27B518-574C-4691-9A0A-AD83D73B2145}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE27B518-574C-4691-9A0A-AD83D73B2145}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Loading…
Cancel
Save