コード例 #1
0
 /// <summary>
 /// Disposes of managed and unmanaged resources used by the object.
 /// </summary>
 public void Dispose()
 {
     if (context != null)
     {
         context.Dispose();
         context = null;
     }
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataRepository"/> class.
 /// </summary>
 public DataRepository()
 {
     context = new NorthwindModel();
     set     = context.Set <TEntity>();
 }