C#C
C#2y ago
Spaxter

✅ EF Core - Not getting updated data from PostgreSQL table

I have the following method in my DbService.cs
public async Task<long?> GetLastDumpTimeStamp(string endpoint)
{
    using (var context = await _dbContextFactory.CreateDbContextAsync())
    {
        DumpHistory? history = await context.DumpHistory.AsNoTracking().Where(row => row.Endpoint == endpoint).FirstOrDefaultAsync();
        return history?.LastUpdate;
    }
}


Which returns a unix timestamp from a postgres table. However if I manually change the data in the column to a completely different number and call the method again I still get the old value prior to my manual change, even after restarting my app. Am I doing something wrong?
Was this page helpful?