Compare commits
2 Commits
248c954ce3
...
1adc0c4d93
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1adc0c4d93 | ||
|
|
02afdfbd0f |
@@ -7,20 +7,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.19" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.19" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="7.0.19" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.19">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.19" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.19" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.19">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.19" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.19" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ namespace DigitalData.EmailProfilerDispatcher.Application
|
|||||||
{
|
{
|
||||||
public static class DIExtensions
|
public static class DIExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddDispatcher<TDbContext>(this IServiceCollection services) where TDbContext : DbContext => services
|
public static IServiceCollection AddDispatcher<TDbContext, TResource>(this IServiceCollection services) where TDbContext : DbContext => services
|
||||||
.AddDispatcherRepository<TDbContext>()
|
.AddDispatcherRepository<TDbContext>()
|
||||||
.AddAutoMapper(typeof(MappingProfile).Assembly)
|
.AddAutoMapper(typeof(MappingProfile).Assembly)
|
||||||
.AddScoped<IEmailOutService, EmailOutService>();
|
.AddScoped<IEmailOutService, EmailOutService<TResource>>();
|
||||||
|
|
||||||
public static IServiceCollection AddDispatcher(this IServiceCollection services, Action<DbContextOptionsBuilder> options) => services
|
public static IServiceCollection AddDispatcher<TResource>(this IServiceCollection services, Action<DbContextOptionsBuilder> options) => services
|
||||||
.AddDbContext<DefaultMailDbContext>(options)
|
.AddDbContext<DefaultMailDbContext>(options)
|
||||||
.AddDispatcher<DefaultMailDbContext>();
|
.AddDispatcher<DefaultMailDbContext, TResource>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ using Microsoft.Extensions.Localization;
|
|||||||
|
|
||||||
namespace DigitalData.EmailProfilerDispatcher.Application.Services
|
namespace DigitalData.EmailProfilerDispatcher.Application.Services
|
||||||
{
|
{
|
||||||
public class EmailOutService : CRUDService<IEmailOutRepository, EmailOutCreateDto, EmailOutDto, EmailOutDto, EmailOut, int>, IEmailOutService
|
public class EmailOutService<TResource> : CRUDService<IEmailOutRepository, EmailOutCreateDto, EmailOutDto, EmailOutDto, EmailOut, int>, IEmailOutService
|
||||||
{
|
{
|
||||||
public EmailOutService(IEmailOutRepository repository, IStringLocalizer localizer, IMapper mapper) : base(repository, localizer, mapper)
|
public EmailOutService(IEmailOutRepository repository, IStringLocalizer<TResource> localizer, IMapper mapper) : base(repository, localizer, mapper)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.19" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.19" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.19">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.19" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.19">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user