Oracle and MVC (EDMX) Issues

iBinc
iBinc used Ask the Experts™
on
Hello,

I am attempting follow Building an MVC 3 App with Database First and Entity Framework 4.1
tutorial using an Oracle EDMX and running into problems.

http://msdn.microsoft.com/en-us/data/gg685489

First off, I get error "type used in a using statement must be implicitly convertible to 'System.IDisposable' when adding this "using" clause.

publicActionResult Index()
        {
          using (var db = new BlogDataEntities())
          {
            return View(db.Blogs.ToList());
          }
        }

Question is...why can't I use "Using" and next question is will this even work with an Oracle database connection? I am very new...so be gentle with me.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2008
Commented:
In order to include a using block, you need a class that implements IDisposable.  

As you can plainly see in the documentation for the DbContext class, that it does implement IDisposable:

DbContext Class
http://msdn.microsoft.com/en-us/library/system.data.entity.dbcontext(v=vs.103).aspx

public class DbContext : IDisposable, IObjectContextAdapter

That exception doesn't make sense.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial