تخطَّ إلى المحتوى

Tag with (ARCH202)

هذا المحتوى غير متوفر بلغتك بعد.

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("...").