Ejemplo 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);
        }
Ejemplo n.º 2
0
 public BaseRepo(GoldStreamerContext db)
 {
     this.db = db;
     table   = db.Set <T>();
 }
Ejemplo n.º 3
0
 public BaseRepo()
 {
     db    = new GoldStreamerContext();
     table = db.Set <T>();
 }
Ejemplo n.º 4
0
 public EditProfileRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Ejemplo n.º 5
0
 public RolePermissionRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Ejemplo n.º 6
0
 public PricerRepo(GoldStreamerContext dbc)
 {
     _context = dbc;
 }
 public NewsMainCategoryRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Ejemplo n.º 8
0
 public FeedbackRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 9
0
 public GlobalPriceRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 10
0
 public NewsCategoryRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 11
0
 public DollarRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Ejemplo n.º 12
0
 public TraderRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 13
0
 public QuestionRepo(GoldStreamerContext dbc) : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 14
0
 private static void DropDatabase(GoldStreamerContext e)
 {
     e.Database.Delete();
 }
Ejemplo n.º 15
0
 public BasketRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 16
0
 public QuestionGroupRepo(GoldStreamerContext dbContext)
 {
     _context = dbContext;
 }
Ejemplo n.º 17
0
 public UsersRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 18
0
 public FavoriteListRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 19
0
 public TraderPricesChartRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }
Ejemplo n.º 20
0
 public SubscribeRepo(GoldStreamerContext dbc)
     : base(dbc)
 {
     _context = dbc;
 }