[ADD] Added sqlite to test project, created di for ef core context. Reworked repositories to use result class.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using DotBased.AspNet.Authority;
|
||||
using DotBased.AspNet.Authority.EFCore;
|
||||
using DotBased.Logging;
|
||||
using DotBased.Logging.MEL;
|
||||
using DotBased.Logging.Serilog;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Serilog;
|
||||
using TestWebApi;
|
||||
using ILogger = Serilog.ILogger;
|
||||
@@ -19,7 +21,10 @@ LogService.AddLogAdapter(new BasedSerilogAdapter(serilogLogger));
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.AddDotBasedLoggerProvider(LogService.Options);
|
||||
|
||||
builder.Services.AddAuthorityContext(options =>
|
||||
{
|
||||
options.UseSqlite("Data Source=dev-dotbased.db");
|
||||
});
|
||||
builder.Services.AddAuthority(options =>
|
||||
{
|
||||
|
||||
|
@@ -8,11 +8,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DotBased.AspNet.Authority.EFCore\DotBased.AspNet.Authority.EFCore.csproj" />
|
||||
<ProjectReference Include="..\DotBased.AspNet.Authority\DotBased.AspNet.Authority.csproj" />
|
||||
<ProjectReference Include="..\DotBased.Logging.MEL\DotBased.Logging.MEL.csproj" />
|
||||
<ProjectReference Include="..\DotBased.Logging.Serilog\DotBased.Logging.Serilog.csproj" />
|
||||
|
Reference in New Issue
Block a user