public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <SalonDbContext>().UseInMemoryDatabase("TestDb").Options; var c = new SalonDbContext(options); Obj = new TestClass(c, c.Appointments); }
public AdministratorService( SalonDbContext db, UserManager <User> userManager, RoleManager <IdentityRole> roleManager ) { this.db = db; this.userManager = userManager; this.roleManager = roleManager; }
public void TestInitialize() { Type = typeof(SalonDbInitializer); var options = new DbContextOptionsBuilder <SalonDbContext>() .UseInMemoryDatabase("TestDb") .Options; _db = new SalonDbContext(options); SalonDbInitializer.Initialize(_db); }
public override void TestInitialize() { var options = new DbContextOptionsBuilder <SalonDbContext>() .UseInMemoryDatabase("TestDb") .Options; Db = new SalonDbContext(options); DbSet = ((SalonDbContext)Db).Clients; Obj = new ClientsRepository((SalonDbContext)Db); base.TestInitialize(); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <SalonDbContext>() .UseInMemoryDatabase("TestDb") .Options; var c = new SalonDbContext(options); Obj = new TestClass(c, c.TreatmentTypes); _data = GetRandom.Object <TreatmentTypeData>(); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <SalonDbContext>() .UseInMemoryDatabase("TestDb") .Options; var c = new SalonDbContext(options); Obj = new TestClass(c, c.TreatmentTypes); _count = GetRandom.UInt8(20, 40); foreach (var p in c.TreatmentTypes) { c.Entry(p).State = EntityState.Deleted; } AddItems(); }
public DetailsRepo(SalonDbContext context) { this.context = context; }
public SalonService(SalonDbContext db, UserManager <User> userManager) { this.db = db; this.userManager = userManager; }
public OffersRepo(SalonDbContext context) { this.context = context; }
public ClientsRepository(SalonDbContext c) : base(c, c.Clients) { }
public ProductService(SalonDbContext db) { this.db = db; }
public TechniciansRepository(SalonDbContext c) : base(c, c?.Technicians) { }
public TechnicianTypesRepository(SalonDbContext c) : base(c, c.TechnicianTypes) { }
public TreatmentTypesRepository(SalonDbContext c) : base(c, c.TreatmentTypes) { }
public GalaryRepo(SalonDbContext context) { this.context = context; }
internal void InitializeTables(ModelBuilder builder) { SalonDbContext.InitializeTables(builder); }
//public AppointmentsRepository() : this(null) { } public AppointmentsRepository(SalonDbContext c) : base(c, c?.Appointments) { }
public DevicesRepo(SalonDbContext context) { this.context = context; }
public DepartmentRepo(SalonDbContext context) { this.context = context; }
public PhotoRepo(SalonDbContext context) { this.context = context; }
public UnitOfWorkRepo(SalonDbContext context) { this.context = context; }
public TreatmentsRepository(SalonDbContext c) : base(c, c?.Treatments) { }