Limitations

Entity Framework Core v5 is still having some limitations. Below is a list of limitations you might run into with the generated code. We have done our best to keep this to a minimum, but some things are simply unavoidable.

  • Unique constraints are not generated as indexes nor as alternative keys. The designer doesn't support alternate keys and unique constraints have no real value to the Entity Framework Core engine. The constraint is already defined in the DB where it is enforced, so it's not really useful to generate the index, as LLBLGen Pro doesn't generate relational model meta data into the mappings.
  • Cascade rules for OnDelete are determined from the rule set on the relationship in the model. EF core supports 3 forms (SetNull, Cascade, Restrict) instead of the 4 we support (SetDefault isn't supported on EF Core). We'll fall back to None if a value not supported by EF core is chosen.
  • Value Type Definitions are mapped as 'Owned types'. Fields which type is set to a ValueTypeDefinition can't be optional/nullable.
  • A many to many relationship based on a many-to-one relationship with the same entity (e.g. Customer m:1 Customer) isn't supported by Entity Framework Core. The designer will issue a warning and ignore the many to many relationship during code generation.
  • Mapping a Target Per Entity inheritance hierarchy requires that the primary key fields of a subtype's table/view have the same name as the primary key fields of the root type's table. This is a limitation in Entity Framework Core v5, see: https://github.com/dotnet/efcore/issues/19811. This will result in an error in the designer.