.NET Data Community Standup - TPH, TPT, and TPC Inheritance mapping with EF Core

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 11

  • @jaymesingleton-xamarincomm8998
    @jaymesingleton-xamarincomm8998 2 роки тому +6

    Best intro ever!!!!

  • @PanosKao
    @PanosKao 2 роки тому +5

    00:56:53 TPC tables can use unique sequence ID by using the following.
    .Property(e => e.Id).HasDefaultValueSql("NEXT VALUE FOR [AnimalIds]");
    01:08:00 TPH tables can use IsSparse() to reduce the space of null data, but Perf. may be sacrified.
    01:24:12 TPH tables may use Discriminator as Enum to improve the perf.
    01:26:34 TPC tables can use UseHiLo() with SQL. SQL-Lite does not support UseHiLo().
    01:30:13 The reason to use "await context.AddRangeAsync()" is UseHiLo().
    01:33:00 HiLo confuses a lot of people because of the keys-gap .
    01:35:00 Arthur recommended not using HiLo for simplicity.
    01:37:25 If you update one raw at a time, you don't need HiLo.

  • @allanbum
    @allanbum 2 роки тому +1

    Thanks from Brazil! 👋👋👋

  • @mohamed-hassan-
    @mohamed-hassan- 9 місяців тому

    Amazing Info, Thanks a lot

  • @koala59230
    @koala59230 2 роки тому

    thanks you for this great standup.

  • @AnNguyen-do7ec
    @AnNguyen-do7ec 2 місяці тому

    how about I want a unique index in some value of the base table (in TPC) ?

  • @malkythealky
    @malkythealky 9 місяців тому

    Is it still necessary to define a sequence for the Id field when using TPC stratgey in EF Core 8? Thanks!

  • @johanredander6360
    @johanredander6360 Рік тому

    Where can I find an working example doing this ? Like a small project ?

  • @mhDuke
    @mhDuke 10 місяців тому

    I still do not understand how Human.FavoriteAnimal navigation will get the right Animal type, you guys just touched the point that there is no foreign key constraint between Human and Animal which is a natural limitation that comes with TBC, but how does ef handle the navigation?! are we going to left join all child tables?

  • @alexisfibonacci
    @alexisfibonacci 2 роки тому +1

    A varchar discriminator column hurts performance. Either use char(1) or a numeric value.

  • @zhant69
    @zhant69 Рік тому +2

    TPC is at 52''