How can I update all rows to null using FluentMigrator fluent syntax? You cannot assign null to anonymous type property.
Update.Table("mytable").Set(new { supplierid = null }).AllRows();
I found the answer to my question. You must use DBNull.Value
.
Update.Table("mytable").Set(new { supplierid = DBNull.Value }).AllRows();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.