Exemple #1
0
 public void Dispose()
 {
     // clean up any objects that were instantiated in the constructor
     _context.Dispose();
     // Call the helper class to Reset AutoMapper since it handles multithreading.
     AutoMapperHelper.Reset();
 }
Exemple #2
0
 public void Dispose()
 {
     // clean up any objects that were instantiated in the constructor
     _context.Flights.RemoveRange(_context.Flights);
     _context.Bookings.RemoveRange(_context.Bookings);
     _context.SaveChanges();
     _context.Dispose();
     // Call the helper class to Reset AutoMapper since it handles multithreading.
     AutoMapperHelper.Reset();
 }