EF4: Difference Between POCO, Self-Monitoring Objects, POCO Proxies

Can someone tell me the difference between POCO, self-monitoring objects, POCO Proxies?

Actually, I am working on Entity Framework 4.0 and POCO (storage template), and whenever I make some changes to POCO and call ObjectContext.Savechanges, it reflects the database. My question is:

  • How does the Context save changes to the database since it is not tracked?
  • Does Context generate on-the-fly tracking information for POCO?

Sample code that I use

        IEFRepository<Category> catRepository = new EFRepository<Category>();
        Category c = catRepository.FindOne<Category>(x => x.Name == "Paper");

        c.Name = "Paper";
        catRepository.SaveChanges(System.Data.Objects.SaveOptions.None);
+5
source share
1 answer

POCOs. , . , EntityObject , . , , ObjectContext.

"" POCOs, , . , , , . DetectChanges.

-POCO-- , () POCO -POCO . "", , . - , , , . . ADO.NET.

+6

All Articles