I'm using entity framework in my MVC website and I'm disposing my database context using using-statement. Now my question is if I close using statement after return, would the database context disposed properly or not. Ex:
public ActionResult SomeAction(){
using (var DB = new DatabaseContext()){
....
return View();
}
}
Do I have to close the using statement before return? Or it would be disposed properly in the way I'm using it.