Exemplo n.º 1
0
        public static RoleManager <IdentityRole, string> CreateRole()
        {
            var dbContext   = new ClothDbContext();
            var store       = new RoleStore <IdentityRole, string, IdentityUserRole>(dbContext);
            var rolemanager = new RoleManager <IdentityRole, string>(store);

            return(rolemanager);
        }
Exemplo n.º 2
0
 public UnitOfWork()
 {
     context    = new ClothDbContext();
     Clothes    = new ClothRepository(context);    // new MockClothRepository();
     Orders     = new OrderRepository(context);    // new MockOrderRepository();
     Categories = new CategoryRepository(context); //new MockCategoryRepository();
     Users      = new UserRepository(context);
 }
Exemplo n.º 3
0
 public IndexModel(
     UserManager <IdentityUser> userManager,
     SignInManager <IdentityUser> signInManager,
     ClothDbContext db)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _db            = db;
 }
 public OrderRepository(ClothDbContext context) : base(context)
 {
     _DbContext = context;
 }
 public DeleteItemModel(ClothDbContext db, IAWSS3Service awsS3Service)
 {
     _db           = db;
     _awsS3Service = awsS3Service;
 }
 //private readonly ClothDbContext _DbContext;
 public CategoryRepository(ClothDbContext context) : base(context)
 {
     //_DbContext = context;
 }
Exemplo n.º 7
0
 public IndexModel(ClothDbContext db, IAWSS3Service awsS3Service)
 {
     _db           = db;
     _awsS3Service = awsS3Service;
 }
 public IndexModel(ClothDbContext db)
 {
     _db = db;
 }
 public CarouselModel(ClothDbContext db)
 {
     _db = db;
 }
 public DashboardModel(ClothDbContext db)
 {
     this.db = db;
 }
Exemplo n.º 11
0
 public Repository(ClothDbContext context)
 {
     dbContext = context;
 }