Description
Using Npgsql.EntityFrameworkCore.PostgreSQL v10.0.0 with EF Core 10, updating a nullable short (short?) property via expression-based update fails.
Error
System.InvalidOperationException: 'No coercion operator is defined between types 'System.Func2[Entities.Concrete.User,System.Nullable1[System.Int16]]' and 'System.Int16'.'
Steps to reproduce
using (var context = new MyDbContext())
{
context.Users.Where(u => u.Id == id)
.ExecuteUpdate(u => u.SetProperty(u => u.LoginFailedCount, u => (short?)0)); // or Convert.ToInt16(0), or just 0
context.SaveChanges();
}