I am currently using this approach to dispose off the connection with datacontext object.
using (var db = GetDbContext(_connectionString))
{
List<Procedure_Name> result =
(from x in db.storedprocedure select x)
.ToList<Procedure_Name>();
return result;
}
I want to know is this the correct way to dispose of connection object or guide me the best possible approach to be used in this context.