Skip to content

Unicode strings in compiled INSERT Queries. #529

@ghost

Description

Hi.
Creating INSERT Query using AsInsert with multible values, I pass desired values as array of objects.
I don't want to execute it and my purpose is just to form needed query using SqlKata.
But for string values, instead of N'MyString' I just have 'MyString'. And if it has non-ASCII characters, after executing as EF Core migration operation, I just get ??????? instead of actual value.

Code snippet:
image

And on of the "entitiy" object fields is string-type value, that passed inside of formed INSERT query incorrectly.
Entity Example:
image

Any ideas of how to paste string parameters as nvarchar with N, not just 'MyString'?
Feel free ta ask any additional information to figure out the task I'm trying to resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions