private AttachmentsDb GetInMemoryContextWithSeedData() { var options = new DbContextOptionsBuilder <AttachmentsDb>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var context = new AttachmentsDb(options); context.Add(_stubFileDto); context.SaveChanges(); return(context); }
public AttachmentsRepository(AttachmentsDb context, IBlobStorageService blobStorageService, ILogger <AttachmentsRepository> logger) { _context = context; _blobStorageService = blobStorageService; _logger = logger; }