I\'m using EF Core with database-first approach using the \"Scaffold-DbContext\"-command to generate my DbContext / Entities.
How can I instruct Scaffold-DbContext t
Currently, EF core does not support enums. Code like this:
public class MyDbContext : DbContext
{
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity(e => {...});
}
}
does not compile with the message:
CS0452 C# The type must be a reference type in order to use it as parameter 'TEntity' in the generic type or method
Solution: you can use enumeration classes instead