I'm using ASP.NET Core 3.1 with Entity Framework. I'm trying to store byte arrays into a database. Of course, my MySQL database should support that, but Entity Framework doesn't seem to work.
Consider the following model:
public class User
{
[Key]
public int Id { get; set; }
public string Username { get; set; }
public string Email { get; set; }
public byte[] Salt { get; set; }
public byte[] Password { get; set; }
[NotMapped]
public string PlainPassword { get; set; }
}
Now, whenever I use the package manager console to do Add-Migration InitialCreate, I get the following output:
PM> Add-Migration InitialCreate
Build started...
Build failed.
Whenever I change the byte[] to string, it works, but the passwords are no strings. What should I do? Convert them to strings or is there another workaround? And if I should convert them to strings, what is the best way to convert them?

--verboseflag will let you know what error prevents build from successPM> Add-Migration InitialCreate -Verbose Using project 'to-do-list-api'. Using startup project 'to-do-list-api'. Build started... Build failed.