2
我试图在.net核心F#web应用程序中设置数据库上下文。作为其中的一部分,我需要转换以下中F#:无法设置实体框架核心
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlite(Configuration.GetConnectionString("DefaultConnection")));
我的F#的版本是:
services.AddDbContext<ApplicationDbContext>(fun (options: DbContextOptionsBuilder) ->
options.UseSqlite(this.Configuration.GetConnectionString("DefaultConnection")))
不过,我收到以下异常:
No overloads match for method 'AddDbContext'. The available overloads are shown below (or in the Error List window).property Startup.Configuration: IConfigurationRoot
什么问题可以解决吗?