I just performing Insert and Read operation using EF with SP. I've two SP, one for read and another for Inserting. When I execute this operation one by one, I am getting this error on second SP
New transaction is not allowed because there are other threads running in the session.
Code
var students = db.GetStudentByID(1);
Student_Mast model = new Student_Mast();
model.First_Name = "John";
model.Last_Name = "Abraham";
model.Roll_No = 2;
db.Student_Mast.Add(model);
db.SaveChanges();
I've checked many post, but all refering to foreach loop.