private void Dispose(bool disposing) { if (!_disposed && disposing) { if (_dataContext != null) { var dc = (IDisposable)_dataContext; _dataContext = null; dc.Dispose(); } _disposed = true; } }
public UZBookingRepository(Ticket ticket, UZAPIConfig apiConfig) { //TODO: maybe possible to instanse context whith Trip and forward it to repository? _dataContext = new UZDataContext(ticket, apiConfig); _placesSets = new List <UZPlacesSet>(); }