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

关于Update的Set设置单个修改字段为null生成语句的问题 #311

Closed
a6336747 opened this issue May 15, 2020 · 1 comment
Closed

Comments

@a6336747
Copy link

_fsql.Update<Usc_Message>().Where(d=>d.MessageType==1).Set(d => d.ReadTime == null)
语句生成为
UPDATE [Usc_Message] SET [ReadTime] IS NULL WHERE ([MessageType] = 1)
导致Sql语句错误,环境为SqlServer2012
根据set单个字段的使用环境,因该是赋值NULL,而不是IS NULL

@2881099
Copy link
Collaborator

2881099 commented May 15, 2020

是有冲突,用这个吧 .Set(d => d.ReadTime, null)

2881099 pushed a commit that referenced this issue May 20, 2020
2881099 pushed a commit that referenced this issue May 24, 2020
@2881099 2881099 closed this as completed Jun 25, 2020
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