c# – Como testar performance Entity Framework?


I want to create mapping with inheritance Person -> Customers, etc.

But I would like to test performance with the 3 types of mapping (TPH,TPT,TPC)

How do I do ? Has anyone had the experience to say which of the 3 becomes easier and faster?


You can use the good old Stop

public void Teste()
    Stopwatch sw = Stopwatch.StartNew();
    var pessoas = MeuContexto.Pessoas.ToList();
    Console.WriteLine("Tempo demorado = {0}ms", sw.Elapsed);
Scroll to Top