| 1234567891011121314151617181920212223 |
- using System.Diagnostics;
- using Microsoft.EntityFrameworkCore;
- using Quadarax.Foundation.Core.Data.Domain;
- namespace qdr.fnd.core.test.Repositories.Fakes
- {
- public class TestDbContext : DataDomain, IDataDomain
- {
- public DbSet<TestDao> Daos { get; set; } = null!;
- public TestDbContext(DbContextOptions options) : base(options)
- {
- }
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- var dbName = "test" + DateTime.Now.ToFileTime().ToString();
- optionsBuilder.UseInMemoryDatabase(dbName)
- .LogTo(message => Debug.WriteLine("EFSQL>>" + message));
- Debug.WriteLine($"*** Context created [{dbName}]");
- }
- }
- }
|