This is question is not about the "Using" in general of c#, and not about when/why to use it etc..
The question is, does the DBContext object dispose the connection by itself, and therefore I don't need to use using
to make it dispose, there is no question about it so don't mark it as duplicated
using (DBContext db = new DBContext())
{
var Order = db.Order.First(r => r.OrderID == 6);
Order.Type = 6;
db.SaveChanges();
}
Or without using
DBContext db = new DBContext();
var Order = db.Order.First(r => r.OrderID == 6);
Order.Type = 6;
db.SaveChanges();
Because I see in this source that using
is not necessary and it's better not to use it.
Will Entity Framework dispose the connection for me?