c# – 配置Dapper.Extensions.Linq

有人可以帮助我第一次配置Dapper.Extensions.
Linq(
https://github.com/ryanwatson/Dapper.Extensions.Linq).

我一直试图为F#项目设置它,尽管从自述文件中很难理解(https://github.com/ryanwatson/Dapper.Extensions.Linq#configuration).

最佳答案 这几乎是C#设置的直接翻译.

open Dapper.Extensions.Linq.Core.Configuration
open Dapper.Extensions.Linq.Mapper
open Dapper.Extensions.Linq.Sql
open Dapper.Extensions.Linq.CastleWindsor

DapperConfiguration.Use()
                   .UseClassMapper(typeof<AutoClassMapper<_>>)
                   .UseContainer<Dapper.Extensions.Linq.CastleWindsor.ContainerForWindsor>(fun c ->  c.UseExisting(_container))
                   .UseSqlDialect(new SqlServerDialect())
                   .FromAssembly("Dapper.Entities")
                   .Build()
点赞