I have a list which has 1000 records List<people> a = new List<people> {get; set;}
And I have try to insert a each record at a time.
foreach( var d in a)
{
servicereferences.MiddleTier data = new servicereferences.MiddleTier();
data.id=a.id;
data.name=a.name;
data.AddObject("datas",data);
}
SaveChanges(data);
So by using Entity Framework -DataServiceContext Addobject() I've added a all data's into addobject method.
Savechanges insert the records a table into database.
It takes more time in dataservicecontext, likely it takes around 6 mins to insert the loop data into database.
Any suggestion's Please!! ( I have to separate into a batch as 1 request to save 100 or 200 records at a time)
Addobject()maybe like this:context.TableName.AddObject(TableEntityInstance);Means:
Here is a example: