Вызов перегруженного метода C#, который выполняет действие <A>или действие от F # - PullRequest
0 голосов
/ 19 февраля 2020

Вот сигнатуры двух перегрузок.

public static IServiceCollection AddDbContextPool<TContext>(
    this IServiceCollection serviceCollection,
    Action<DbContextOptionsBuilder> optionsAction,
    int poolSize = 128) where TContext : DbContext { ...

public static IServiceCollection AddDbContextPool<TContext>(
    this IServiceCollection serviceCollection,
    Action<IServiceProvider, DbContextOptionsBuilder> optionsAction,
    int poolSize = 128)
    where TContext : DbContext { ...

Вот вторая перегрузка, вызываемая в C# enter image description here

Но когда я попробуйте вызвать 2-ю перегрузку с F #, я получаю эту ошибку:

enter image description here

Как это исправить? Спасибо!

1 Ответ

1 голос
/ 19 февраля 2020

Попробуйте пройти:

fun (sp: IServiceProvider) (optionsBuilder: ...) -> ...
...