0

I tried to add EntityDataSource from NuGet for entity framework 6.0.
Please take a look at this question.
And also take a look at this answer.
The problem is i can not find this piece of code in my code behind for replace :

protected void OnContextCreating(object sender, EntityDataSourceContextCreatingEventArgs e){... } 

Where is it?
Should i add it manually to code behind?
What exactly should be those codes?

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
SilverLight
  • 19,668
  • 65
  • 192
  • 300

1 Answers1

1

OnContextCreating() is the event that is only called when the EntityDataSource creates the ObjectContext that is used to work with entity data objects.

Check the link below for details: https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.entitydatasource.contextcreating?view=netframework-4.8

MK Ashraf
  • 36
  • 1
  • 5