Feature'y Entity Framework Core 5.0

0

Takie luźne pytanko. Jaka funkcjonalność wprowadzona w Entity Framework Core 5.0. jest według Was najciekawsza/ najbardziej użyteczna? Dodatkowo byłoby super jakbyście napisali dlaczego i jaki wpływ wywarła na sposób obsługi bazy danych. ;)

0

Może ta, @somekind się ucieszy :D

EF Core 5.0 supports many-to-many relationships without explicitly mapping the join table.
EF Core 5.0 recognizes this as a many-to-many relationship by convention, and automatically creates a PostTag join table in the database. Data can be queried and updated without explicitly referencing the join table, considerably simplifying code. The join table can still be customized and queried explicitly if needed.

public class Post
{
    public int Id { get; set; }
    public string Name { get; set; }
    public ICollection<Tag> Tags { get; set; }
}

public class Tag
{
    public int Id { get; set; }
    public string Text { get; set; }
    public ICollection<Post> Posts { get; set; }
}
1

Nikt już na poważnie nie używa baz relacyjnych, nawet Microsoft, a oni ORMa dalej klepią.

0

ja bym bardziej już się skupił na .net 6 i ef core 6 w przyszłym tygodniu premiera :)

1 użytkowników online, w tym zalogowanych: 0, gości: 1