Exemple #1
0
        private void SetUpContext()
        {
#pragma warning disable 618
            // Set up in memory context.
            var options = new DbContextOptionsBuilder <OysterCardContext>().UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;
#pragma warning restore 618

            var context = new OysterCardContext(options);

            // Assign the mocked db context to the settings unit of work.
            _unitOfWork = new SettingsUOW(context);
        }
 /// <inheritdoc />
 public SettingsService(ISettingsUOW unitOfWork) => _unitOfWork = unitOfWork;