Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to using Microsoft.Data.SqlClient fluent-nhibernate #488

Closed
rogeryamato opened this issue Feb 4, 2021 · 2 comments
Closed

how to using Microsoft.Data.SqlClient fluent-nhibernate #488

rogeryamato opened this issue Feb 4, 2021 · 2 comments

Comments

@rogeryamato
Copy link

Is fluent-nhibernate can use Microsoft.Data.SqlClient?

And how to use it..

I see in this issue nhibernate/nhibernate-core#2216 has fix it, But how about for fluent-nhibernate?

Thanks.

@gliljas
Copy link
Member

gliljas commented Feb 4, 2021

Fluent NHibernate is used for mapping and doesn't care how NHibernate connects to the database.

@jornhd
Copy link

jornhd commented Feb 16, 2021

You need to add .Driver<MicrosoftDataSqlClientDriver>() in the configuration:

Fluently.Configure()
    .Database(
        MsSqlConfiguration.MsSql2012
            .Driver<MicrosoftDataSqlClientDriver>()
            .ConnectionString(connectionString)
    )
    .Mappings(...)
    .BuildSessionFactory();

@hazzik hazzik closed this as completed Feb 16, 2021
@nhibernate nhibernate locked and limited conversation to collaborators Feb 16, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants