Multiple choice technology platforms and products

Default method name created by Entity Framework to insert an entity in database is (Note: will be replaced by the name of actual Entity)

  1. InsertTo<EntityName>

  2. AddTo<EntityName>

  3. Insert<EntityName>

  4. Add<EntityName>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In older versions of Entity Framework (such as ObjectContext in EF4), the generated code included methods named AddTo (e.g., AddToCustomers) to add entities. Newer versions use DbSet.Add().