I want to add MediatR
to my services.
Here is the code:
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMediatR(Assembly.GetExecutingAssembly());
}
// rest of codes ...
}
Here is the Error:
Error CS1503 Argument 2: cannot convert from 'System.Reflection.Assembly' to 'System.Action<Microsoft.Extensions.DependencyInjection.MediatRServiceConfiguration>'