Skip to content

Update query with new expression crashes in visual basic #3716

@Epicycle23

Description

@Epicycle23

NHibernate 5.4.2
.NET Framework 4.8

When running a query like this in Visual Basic an error is thrown because NHibernate checks if the given expression is a NewExpression which is the case in c# but not in VB (UnaryExpression).

VB
session.Query(Of Entity).Update(function(x) New With {.Property1 = "value"})

c#
session.Query<Entity>().Update(x => new { Property1 = "value" });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions