Closed soul-soft closed 1 year ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.
class Program { static async Task Main(string[] args) { var services = new ServiceCollection(); services.AddDbContext();
services.AddMediatR(c =>
{
c.RegisterServicesFromAssemblyContaining();
c.AddBehavior(typeof(IPipelineBehavior<,>), typeof(NewTransaction<,>));
});
var sp = services.BuildServiceProvider();
var mediator = sp.GetRequiredService();
mediator.SendBatch(new IRequest[]
{
new DeleteStudentReuqest(1),
new DeleteStudentReuqest(2),
});
}
}