locked
Can't see addto* function in db_entity object RRS feed

  • Question

  • Hi,

    I added an ADO.NET Entity Data Model to my WPF application.

    In my main entity object - MyDBEntities -  I can't see any addto* function (AddToCustomers etc.).

    I understand that these function should be Automaticall created according to my tables.

    Any body know why I can't see these functions?

    Thanks.

    Tuesday, January 15, 2013 9:01 AM

Answers

  • Hi rgr123;

    The AddToXXX methods are only supported in EF ObjectContext and NOT DbContext. In DbContext you can use the Add method of the DbSet.

      


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    • Proposed as answer by Priscila Mayumi Sato Tuesday, January 15, 2013 4:36 PM
    • Marked as answer by rgr123 Wednesday, January 16, 2013 6:08 AM
    Tuesday, January 15, 2013 2:56 PM