Example #1
0
        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);
        }
Example #2
0
 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);
        }
Example #4
0
        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();
        }
Example #5
0
        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>();
        }
Example #6
0
        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();
        }
Example #7
0
 public DetailsRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #8
0
 public SalonService(SalonDbContext db, UserManager <User> userManager)
 {
     this.db          = db;
     this.userManager = userManager;
 }
Example #9
0
 public OffersRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #10
0
 public ClientsRepository(SalonDbContext c) : base(c, c.Clients)
 {
 }
Example #11
0
 public ProductService(SalonDbContext db)
 {
     this.db = db;
 }
Example #12
0
 public TechniciansRepository(SalonDbContext c) : base(c, c?.Technicians)
 {
 }
 public TechnicianTypesRepository(SalonDbContext c) : base(c, c.TechnicianTypes)
 {
 }
Example #14
0
 public TreatmentTypesRepository(SalonDbContext c) : base(c, c.TreatmentTypes)
 {
 }
Example #15
0
 public GalaryRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #16
0
 internal void InitializeTables(ModelBuilder builder)
 {
     SalonDbContext.InitializeTables(builder);
 }
 //public AppointmentsRepository() : this(null) { }
 public AppointmentsRepository(SalonDbContext c) : base(c, c?.Appointments)
 {
 }
Example #18
0
 public DevicesRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #19
0
 public DepartmentRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #20
0
 public PhotoRepo(SalonDbContext context)
 {
     this.context = context;
 }
 public UnitOfWorkRepo(SalonDbContext context)
 {
     this.context = context;
 }
Example #22
0
 public TreatmentsRepository(SalonDbContext c) : base(c, c?.Treatments)
 {
 }