Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

enable asnotracking in asp.net core at global level

If you have additional settings (e.g. connection string), then the DbContextOptions helps. 
  For example: 
var dbContextOptionsBuilder = new DbContextOptionsBuilder<BloggingContext>()
  .UseSqlServer("SQL connection to Blogging database").
  UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enable #asnotracking #core #global #level
ADD COMMENT
Topic
Name
2+1 =