Trying to auto-increment counter during edit in ASP.NET Core Entity Framework

Try this:

var employee =  await _context.Employees
               .Where(e => e.Id == employee.Id) 
                .FisrstOrDefaultAsync();

employee.TimesModified+= 1;
_context.Entry(employee).State = EntityState.Modified;
//or _context.Entry(employee).Property(t=>t.TimesModified).IsModified = true;
await _context.SaveChangesAsync();