I have an entity something like this:
public class Customer
{
public string Id { get; set; }
public string Name { get; set; }
}
I am reading using LinQ as follows:
public IQueryable<Customer> GetCustomer()
{
var result = from cust in _dbContext.Customers.AsNoTracking() select cust;
return result;
}
First time everything works just fine but when I added a customer in DB manually, the same customer is not reflecting in this query, it always returns the old records.
So how do I always get the updated customers from DB?
Note: I am using EF 4