title: Error using Using
body: <p>I have an error</p>
  
  <blockquote>
    <p>Type used in a using statement must be implicitly convertible to 'System.IDisposable'</p>
  </blockquote>
  
  <p>on line</p>
  
  <pre><code>using (var context = new EntityContainer())
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Data.SqlClient;
  using System.Globalization;
  using System.Data;
  using System.Data.Entity;
  using school.usi.susibar.model;
  
  namespace school.usi.susibar.test
  {
      class Program
      {
  
          public static void Main(string []args)
           {
              using (var context = new EntityContainer())
              {
  
                  addOrderStatusType(context);
  
                  Console.ReadLine();
              }
          } 
  
  
          private static void addOrderStatusType(EntityContainer context)
          {
              try
              {
                  OrderStatusType type = new OrderStatusType
                  {
                      Name = "Vyrizeno", 
                      CancelPermission = false, 
                      ChangePermission = false
                  };
                  context.OrderStatusTypes.Add(type);
                  context.SaveChanges();
                  Console.WriteLine("Pridano");
              }
              catch (Exception ex) {
                  Console.WriteLine(ex.InnerException);
              }
          }
           }
  
              }
  </code></pre>
  
  <p>The EntityContainer() looks like this...</p>
  
  <pre><code>//------------------------------------------------------------------------------
  // &lt;auto-generated&gt;
  //    This code was generated from a template.
  //
  //    Manual changes to this file may cause unexpected behavior in your application.
  //    Manual changes to this file will be overwritten if the code is regenerated.
  // &lt;/auto-generated&gt;
  //------------------------------------------------------------------------------
  
  namespace school.usi.susibar.model
  {
      using System;
      using System.Data.Entity;
      using System.Data.Entity.Infrastructure;
  
      public partial class EntityContainer : DbContext
      {
          public EntityContainer()
              : base("name=EntityContainer")
          {
          }
  
          protected override void OnModelCreating(DbModelBuilder modelBuilder)
          {
              throw new UnintentionalCodeFirstException();
          }
  
          public DbSet&lt;Role&gt; Roles { get; set; }
          public DbSet&lt;Category&gt; Categories { get; set; }
          public DbSet&lt;Table&gt; Tables { get; set; }
          public DbSet&lt;OrderStatusType&gt; OrderStatusTypes { get; set; }
          public DbSet&lt;Person&gt; Persones { get; set; }
          public DbSet&lt;Item&gt; Items { get; set; }
          public DbSet&lt;Order&gt; Orders { get; set; }
          public DbSet&lt;Stock&gt; Stocks { get; set; }
          public DbSet&lt;ItemOrderList&gt; ItemOrderLists { get; set; }
          public DbSet&lt;ItemOrderStatus&gt; ItemOrderStatuses { get; set; }
          public DbSet&lt;PaymentOrderStatus&gt; PaymentOrderStatuses { get; set; }
          public DbSet&lt;Prepaid&gt; Prepaids { get; set; }
      }
  }
  </code></pre>
  
  <p>EDIT: DbContext implements IDisposable and I cant edit EntityContainer() class since its generated from a template.</p>
  
  <p>Any ideas what is wrong?</p>