public CommonContext()
 {
     ProductRepositry   = new ProductRepositry();
     OrderRepositry     = new OrderRepositry();
     CartItemRepositry  = new CartItemRepositry();
     MenuGroupRepositry = new MenuGroupRepositry();
     UserManager        = new ApplicationUserManager(new UserStore <ApplicationUser>(new ApplicationDbContext()));
     RoleManager        = new ApplicationRoleManager(new RoleStore <ApplicationRole>(new ApplicationDbContext()));
 }
 public CommonContext(IOwinContext context)
 {
     ProductRepositry   = new ProductRepositry(context);
     OrderRepositry     = new OrderRepositry(context);
     CartItemRepositry  = new CartItemRepositry(context);
     MenuGroupRepositry = new  MenuGroupRepositry(context);
     UserManager        = context.GetUserManager <ApplicationUserManager>();
     RoleManager        = context.Get <ApplicationRoleManager>();
 }