Normalement ça marche, j'ai juste un pb de commande dotnet qui n'est pas reconnu sur la machine
continuous-integration/drone/push Build is failing Details

pull/6/head
Leni BEAULATON 3 weeks ago
parent 4d2985f73f
commit 3029f097bc

@ -75,9 +75,9 @@ namespace Contextlib
l => l.HasOne<Question>().WithMany().HasForeignKey(q => q.IdQuestion),
r => r.HasOne<Quiz>().WithMany().HasForeignKey(u => u.IdQuiz)
);
modelBuilder.Entity<Admin>()
.HasOne(a => a.User)
.WithOne(u => u.admin);
//modelBuilder.Entity<Admin>()
// .HasOne(a => a.User)
// .WithOne(u => u.admin);
}
public WTFContext()

@ -40,8 +40,8 @@ namespace Entity
public ICollection<Quote> Favorite { get; set; } = new List<Quote>();
[ForeignKey(nameof(Admin))]
public int Idadmin { get; set; }
public Admin admin { get; set; }
//[ForeignKey(nameof(Admin))]
//public int Idadmin { get; set; }
//public Admin admin { get; set; }
}
}

@ -6,4 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Contextlib\Contextlib.csproj" />
<ProjectReference Include="..\Dto2Entities\Dto2Entities.csproj" />
<ProjectReference Include="..\DTO\DTO.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>
</Project>

@ -1,4 +1,3 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34723.18
@ -25,6 +24,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTO", "DTO\DTO.csproj", "{9
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dto2Entities", "Dto2Entities\Dto2Entities.csproj", "{08194729-E222-4C9A-B860-D944225B8895}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServicesApi", "ServicesApi\ServicesApi.csproj", "{6A9AC3D2-C1CD-450A-BD3C-22FAFC9B5328}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -55,10 +56,6 @@ Global
{2CF20FAC-C2F1-4048-9D46-F39081B0FBEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CF20FAC-C2F1-4048-9D46-F39081B0FBEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CF20FAC-C2F1-4048-9D46-F39081B0FBEF}.Release|Any CPU.Build.0 = Release|Any CPU
{4A1CBA3D-C798-4E19-865F-39F919F1205A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A1CBA3D-C798-4E19-865F-39F919F1205A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A1CBA3D-C798-4E19-865F-39F919F1205A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A1CBA3D-C798-4E19-865F-39F919F1205A}.Release|Any CPU.Build.0 = Release|Any CPU
{48002CA2-7CFF-4077-90CF-392476320CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48002CA2-7CFF-4077-90CF-392476320CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48002CA2-7CFF-4077-90CF-392476320CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -79,6 +76,10 @@ Global
{08194729-E222-4C9A-B860-D944225B8895}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08194729-E222-4C9A-B860-D944225B8895}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08194729-E222-4C9A-B860-D944225B8895}.Release|Any CPU.Build.0 = Release|Any CPU
{6A9AC3D2-C1CD-450A-BD3C-22FAFC9B5328}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A9AC3D2-C1CD-450A-BD3C-22FAFC9B5328}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A9AC3D2-C1CD-450A-BD3C-22FAFC9B5328}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A9AC3D2-C1CD-450A-BD3C-22FAFC9B5328}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -3,13 +3,16 @@ using Shared;
using StubApi;
using Contextlib;
using Entity;
using StubbedContextLib;
using ServicesApi;
var builder = WebApplication.CreateBuilder(args);
//API
builder.Services.AddScoped<IUserService<UserDTO>, UserServiceStub>();
builder.Services.AddScoped<IUserService<UserDTO>, UserService>();
builder.Services.AddScoped<IQuoteService<QuoteDTO>, QuoteServiceStub>();
//EF
builder.Services.AddScoped<WTFContext, StubWTFContext>();
builder.Services.AddScoped<IUserService<Users>, DbUsersManager>();
// Add services to the container.

@ -17,9 +17,13 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Contextlib\Contextlib.csproj" />
<ProjectReference Include="..\DTO\DTO.csproj" />
<ProjectReference Include="..\Entity\Entity.csproj" />
<ProjectReference Include="..\ServicesApi\ServicesApi.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
<ProjectReference Include="..\StubApi\StubApi.csproj" />
<ProjectReference Include="..\StubbedContextLib\StubbedContextLib.csproj" />
</ItemGroup>
</Project>

Loading…
Cancel
Save