Ejemplo n.º 1
0
 public DomainEditorDialogViewModel(
     DomainPropertyService domainPropertyService,
     DomainsService domainsService)
 {
     _domains = domainsService;
     _domainPropertyService = domainPropertyService;
 }
Ejemplo n.º 2
0
        private DomainsService GetInMemoryDomainsService()
        {
            DbContextOptions <AppDbContext> options;
            var builder = new DbContextOptionsBuilder <AppDbContext>();

            builder.UseInMemoryDatabase("domains-test");
            options = builder.Options;
            var db = new AppDbContext(options);

            db.Database.EnsureDeleted();
            db.Database.EnsureCreated();

            var properties = new DomainPropertyService(db);
            var domains    = new DomainsService(db, properties);

            return(domains);
        }