Esempio n. 1
0
        public UnitOfWork(GoldStreamerContext e, bool DropDB = false)
        {
            if (DropDB)
            {
                DropDatabase(e);
            }
            if (e != null)
            {
                entities = e;
            }
            else
            {
                entities = new GoldStreamerContext();
            }

            TraderRepo            = new TraderRepo <Trader>(this.entities);
            TradePricesRepo       = new TraderPricesRepo <TraderPrices>(this.entities);
            PriceViewerRepo       = new PricerRepo <Prices>(this.entities);
            BasketRepo            = new BasketRepo <Basket>(this.entities);
            BasketPricesRepo      = new BasketPricesRepo <BasketPrices>(this.entities);
            BasketTradersRepo     = new BasketTradersRepo <BasketTraders>(this.entities);
            TraderFavRepo         = new TraderFavRepo <TraderFavorites>(this.entities);
            FavorateListRepo      = new FavoriteListRepo <FavoriteList>(this.entities);
            UsersRepo             = new UsersRepo <Users>(this.entities);
            GovernorateRepo       = new GovernorateRepo(this.entities);
            CityRepo              = new CityRepo(this.entities);
            RegionRepo            = new RegionRepo(this.entities);
            RolePermissionRepo    = new RolePermissionRepo <RolePermission>(this.entities);
            FeedbackRepo          = new FeedbackRepo <Feedback>(this.entities);
            QuestionGroupRepo     = new QuestionGroupRepo <QuestionGroup>(this.entities);
            QuestionRepo          = new QuestionRepo <Question>(this.entities);
            SubscribeRepo         = new SubscribeRepo <Subscribe>(this.entities);
            NewsMainCategoryRepo  = new NewsMainCategoryRepo <NewsMainCategory>(this.entities);
            NewsCategoryRepo      = new NewsCategoryRepo <NewsCategory>(this.entities);
            NewsRepo              = new NewsRepo <News>(this.entities);
            GlobalPriceRepo       = new GlobalPriceRepo <GlobalPrice>(entities);
            TraderPricesChartRepo = new TraderPricesChartRepo <TraderPricesChart>(entities);
            DollarRepo            = new DollarRepo <Dollar>(entities);
        }
Esempio n. 2
0
 public BaseRepo(GoldStreamerContext db)
 {
     this.db = db;
     table   = db.Set <T>();
 }
Esempio n. 3
0
 public BaseRepo()
 {
     db    = new GoldStreamerContext();
     table = db.Set <T>();
 }
 public EditProfileRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Esempio n. 5
0
 public RolePermissionRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Esempio n. 6
0
 public PricerRepo(GoldStreamerContext dbc)
 {
     _context = dbc;
 }
 public NewsMainCategoryRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Esempio n. 8
0
 public FeedbackRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
 public GlobalPriceRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 10
0
 public NewsCategoryRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 11
0
 public DollarRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Esempio n. 12
0
 public TraderRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 13
0
 public QuestionRepo(GoldStreamerContext dbc) : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 14
0
 private static void DropDatabase(GoldStreamerContext e)
 {
     e.Database.Delete();
 }
Esempio n. 15
0
 public BasketRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 16
0
 public QuestionGroupRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Esempio n. 17
0
 public UsersRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 18
0
 public FavoriteListRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 19
0
 public TraderPricesChartRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Esempio n. 20
0
 public SubscribeRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }