Zum Inhalt springen

Tag with (ARCH202)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key dotnet.ef.tag-with · Severity info · Category ef

To correlate generated SQL with its source in logs and profilers, queries should carry an annotation tag.

var orders = await _db.Orders
.Where(o => o.CustomerId == id)
.ToListAsync();
var orders = await _db.Orders
.TagWith("GetOrdersByCustomer")
.Where(o => o.CustomerId == id)
.ToListAsync();

Add a meaningful tag to queries with TagWith("...").