I changed the data type of a field in my model from string to byte array and I got this error when I run Update-Database code first migration method.
Update-Database
Implicit conversion from data type nvarchar(max) to varbinary(max) is not allowed. Use the CONVERT function to run this query.
public override void Up() { AlterColumn("dbo.ApplicantLogins", "Photograph", c => c.Binary(nullable: false)); } public override void Down() { AlterColumn("dbo.ApplicantLogins", "Photograph", c => c.String(nullable: false)); }