views:

8

answers:

1

why is it that i dont have AddToEntity (ex: AddToCustomer) not available on my context..all i have is AddObject..? Thankx. I am using EF 4.0

A: 

AddToCustomer just wraps { AddObject(myCustomer) }. There is no difference.

Are you referencing "YourEntityContainer" or ObjectContext?

YourEntityContainer will have the generated AddToCustomer, ObjectContxt, the base class, will not.

jfar
Hi! I am using ObjectContext but also i tried to refence the entitycontainer but there is only AddObject available that takes 1 argument. I saw lots of blogs where people have the addtoentity available on their projects...I am using self-tracking entities i dont know if has to do anything with AddToEntity not being generated. All i need is save a derived entity to an existing base entity.