.Net Core, MVC-6, EF-7
writing data to Postgres SQL:
db.SaveChanges(); db.Database.CommitTransaction();
After that I try to read this data using LINQ-SQL - there is no recorded data. Reload page - i.e. new query - the recorded data using LINQ-SQL read!
Actually the question is why the recorded data is not read after the record and what should I do to be read?
All code in one function. No Async or await.
db.Database.BeginTransaction();
I change the base:
List<License> DelLicenses = db.Licenses .Where(u => u.UserId == UserId && u.ProductId == ProductId).ToList(); db.RemoveRange(DelLicenses); db.SaveChanges(); ....; db.SaveChanges(); db.Database.CommitTransaction();
And here it is not read:
List<License> DelLicenses = db.Licenses .Where(u => u.UserId == UserId && u.ProductId == ProductId).ToList();
asp.net-core
and.net-core
tags, because the bug (?) Is not specific for these platforms. Added taglinq2sql
- Pavel Mayorov