Skip to content

Fail to cast enum as nvarchar for Linq Contains #2453

@nemenos

Description

@nemenos

Hello,
System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the nvarchar value 'cash' to data type int.
is still thrown when using Contains method. for example:
query.Where(x => filter.PaymentMethods.Contains(x.PaymentMethod));
where payment method is mapped on db as a string (default):
fluentnhibernate -> Map(x => x.PaymentMethod).Not.Nullable();

thank you

ps. this happens after upgrading from 5.2.7 to 5.3.1, No code changed. I had to rollback to previous version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions