Skip to content
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

EFBatchOperation Update - Incorrect syntax near the keyword 'IS' #52

Open
titobf opened this issue Jul 26, 2015 · 1 comment
Open

EFBatchOperation Update - Incorrect syntax near the keyword 'IS' #52

titobf opened this issue Jul 26, 2015 · 1 comment

Comments

@titobf
Copy link

titobf commented Jul 26, 2015

I want to set an FK column to null.

EFBatchOperation.For(context, context.Table)
.Where(a => a.FKColumn == id).Update(a => a.FKColumn , p => null);

Output:

UPDATE [dbo].[Table] SET [FKColumn] IS NULL WHERE [FKColumn] = @p__linq__0

Instead of "IS", it should output "=".

@MikaelEliasson
Copy link
Owner

There methods are a bit hacky. I need to consider if I should add an ugly fix or try to implement proper sql generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants