title: EF 6 slowness issue with bigger model
body: <p>I am using EF 6 with DB first approach and I am facing slowness issue. My table count crosses 600. Any help in this regard will be helpful.</p>
  
  <p>I have created a dataaccess class in order to get data using singleton approach. Any good link or article may help.</p>
  
  <p>Let me share my data model approach</p>
  
  <p>DataAcess.cs</p>
  
  <pre><code>public class DataAccess
  {
      internal Model.Entities _ctx = null;
      private static DataAccess self = null;
      public object ModulePermission;
  
      private DataAccess()
      {
          var tmp = new ConnectionStringBuilder(Utility.GetConnectionString());
          _ctx = new Model.Entities(tmp.CaliberMatrixString);
  
          // temporarily dissabling the EF entity validation - it should be removed in the next code sync.
          _ctx.Configuration.ValidateOnSaveEnabled = false;
      }
  
      public static DataAccess Instance
      {
          get
          {
              var context = HttpContext.Current;
              if (context != null)
              {
                  const string kApplicationSettings = "ApplicationObject";
                  if (context != null &amp;&amp; context.Items[kApplicationSettings] != null)
                  {
                      var da = context.Items[kApplicationSettings] as DataAccess;
                      return da;
                  }
  
                  self = new DataAccess();
                  context.Items[kApplicationSettings] = self;
              }
              else
              {
                  self = new DataAccess();
              }
              return self;
          }
      }
  
      public void Save()
      {
          _ctx.SaveChanges();
      }
  
      internal Model.CaliberMatrixEntities Ctx { get { return _ctx; } }
  
      public void Dispose()
      {
          if (self != null)
          {
              //DataAccess.Instance.Dispose();
              const string kApplicationSettings = "ApplicationObject";
              var context = HttpContext.Current;
              if (context != null &amp;&amp; context.Items[kApplicationSettings] != null)
                  context.Items[kApplicationSettings] = null;
              _ctx.Dispose();
              _ctx = null;
              GC.SuppressFinalize(this);
              self = null;
          }
      }
  </code></pre>