I am making several movements at the same time, and I need to ensure that if I make an output on one screen, on the other being open it checks the existence of data, that is why I am using the Linq extension "asNoTracking" to be able to consult the correct data of the DB.
var all = this._contexto.CodigosArticulos.AsNoTracking();
LINQ queries with NoTracking
The use of NoTracking() is recommended when your query is intended only to perform read operations, so you will get the entities materialized by the Entity Framework but they will not be tracked by the context. This ensures minimal memory usage and better performance.
Example, if you want to update an entity obtained from a query with NoTracking():
Referencehttps://msdn.microsoft.com/en-us/data/hh949853.aspx#5