Closed eestein closed 1 year ago
Hi, I'm sorry if this is already written somewhere, I read the migration guides and the readme, but couldn't find my actual issue.
This is my current code:
var assemblies = Assembly .GetEntryAssembly()! .GetReferencedAssemblies() .Select(Assembly.Load) .Append(Assembly.GetCallingAssembly()) .ToArray(); services.AddMediatR(config => config.Using<Mediator>(), assemblies);
From what I understood, this is how it should be done on v12:
var assemblies = Assembly .GetEntryAssembly()! .GetReferencedAssemblies() .Select(Assembly.Load) .Append(Assembly.GetCallingAssembly()) .ToArray(); services.AddMediatR(config => config.RegisterServicesFromAssemblies(assemblies));
Is that correct? config => config.Using<Mediator>() is no longer required?
config => config.Using<Mediator>()
Thanks!
Is the Mediator class your custom one? If not, then no it's not required and never was required if you wanted to use the built-in version.
Mediator
Hi, I'm sorry if this is already written somewhere, I read the migration guides and the readme, but couldn't find my actual issue.
This is my current code:
From what I understood, this is how it should be done on v12:
Is that correct?
config => config.Using<Mediator>()
is no longer required?Thanks!