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); }
public BaseRepo(GoldStreamerContext db) { this.db = db; table = db.Set <T>(); }
public BaseRepo() { db = new GoldStreamerContext(); table = db.Set <T>(); }
public EditProfileRepo(GoldStreamerContext dbContext) { _context = dbContext; }
public RolePermissionRepo(GoldStreamerContext dbContext) { _context = dbContext; }
public PricerRepo(GoldStreamerContext dbc) { _context = dbc; }
public NewsMainCategoryRepo(GoldStreamerContext dbContext) { _context = dbContext; }
public FeedbackRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public GlobalPriceRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public NewsCategoryRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public DollarRepo(GoldStreamerContext dbContext) { _context = dbContext; }
public TraderRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public QuestionRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
private static void DropDatabase(GoldStreamerContext e) { e.Database.Delete(); }
public BasketRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public QuestionGroupRepo(GoldStreamerContext dbContext) { _context = dbContext; }
public UsersRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public FavoriteListRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public TraderPricesChartRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }
public SubscribeRepo(GoldStreamerContext dbc) : base(dbc) { _context = dbc; }