This is very similar to (but not quite a duplicate of) this question.
LINQ to SQL will open and close connections when it needs to - you don't really have to dispose of the DataContext. However, there are times when you can "trick" the context into leaving a connection open when you shouldn't - I personally like to dispose of it as a matter of course. See my answer to the other question for a bit more detail from Matt Warren of the LINQ to SQL team.
I don't know about the Entity Framework, however.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…