refactor
This commit is contained in:
parent
e282e2ece3
commit
84457413b2
20 changed files with 224 additions and 246 deletions
|
@ -5,10 +5,10 @@ using Microsoft.Extensions.Logging;
|
|||
|
||||
namespace Femto.Common.Infrastructure;
|
||||
|
||||
public class SaveChangesPipelineBehaviour<TRequest, TResponse>(
|
||||
public class DDDPipelineBehaviour<TRequest, TResponse>(
|
||||
DbContext context,
|
||||
IPublisher publisher,
|
||||
ILogger<SaveChangesPipelineBehaviour<TRequest, TResponse>> logger
|
||||
ILogger<DDDPipelineBehaviour<TRequest, TResponse>> logger
|
||||
) : IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : notnull
|
||||
{
|
|
@ -12,7 +12,7 @@ public static class DomainServiceExtensions
|
|||
services.AddScoped<DbContext>(s => s.GetRequiredService<TContext>());
|
||||
services.AddTransient(
|
||||
typeof(IPipelineBehavior<,>),
|
||||
typeof(SaveChangesPipelineBehaviour<,>)
|
||||
typeof(DDDPipelineBehaviour<,>)
|
||||
);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue