Пример #1
0
 /// <summary>
 ///     Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
 /// </summary>
 /// <param name="disposing">
 ///     true to release both managed and unmanaged resources; false to release only unmanaged
 ///     resources.
 /// </param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _db.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     _db?.Dispose();
 }