Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Cortex.Mediator.Commands;
using Cortex.Mediator.Infrastructure;
using Cortex.Mediator.Notifications;
using Cortex.Mediator.Processors;
using Cortex.Mediator.Queries;
Expand Down Expand Up @@ -28,8 +27,6 @@ public static IServiceCollection AddCortexMediator(
// Validation has been removed for issue #118
//services.AddValidatorsFromAssemblies(handlerAssemblyMarkerTypes.Select(t => t.Assembly));

services.AddUnitOfWork();

RegisterHandlers(services, handlerAssemblyMarkerTypes, options);
RegisterProcessors(services, handlerAssemblyMarkerTypes, options);
RegisterPipelineBehaviors(services, options);
Expand Down Expand Up @@ -161,11 +158,5 @@ private static void RegisterPipelineBehaviors(IServiceCollection services, Media
services.AddTransient(typeof(IStreamQueryPipelineBehavior<,>), behaviorType);
}
}

private static void AddUnitOfWork(this IServiceCollection services)
{
services.AddScoped<IUnitOfWork>(provider =>
new UnitOfWork(provider.GetRequiredService<IDbConnection>()));
}
}
}
32 changes: 0 additions & 32 deletions src/Cortex.Mediator/Infrastructure/IUnitOfWork.cs

This file was deleted.

61 changes: 0 additions & 61 deletions src/Cortex.Mediator/Infrastructure/UnitOfWork.cs

This file was deleted.