none
Entity Framework 6.1 is context dirty RRS feed

  • Question

  • How can I tell when my data has been updated in my application?

    I would like to prompt the user before I do a dbcontext SaveChanges.


    Certified Geek

    Wednesday, May 21, 2014 2:47 PM

Answers

  • using (var db = new Model1())
    {
        if (db.ChangeTracker.HasChanges())
        {
            Console.WriteLine("Something has changed");
        }
    }
    


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by Arne MN Wednesday, May 28, 2014 1:38 PM
    Wednesday, May 28, 2014 12:25 PM

All replies