Exemplo n.º 1
0
 public InvestmentToolPriceChangedIntegrationEvent(InvestmentTool investmentTool, DateTime priceDate, double buyingPrice, double salesPrice)
 {
     InvestmentTool = investmentTool;
     BuyingPrice    = buyingPrice;
     SalesPrice     = salesPrice;
     PriceDate      = priceDate;
 }
Exemplo n.º 2
0
        private void ImportEmtias(ImsContext context)
        {
            var emtias = GetJson <List <GoldSeed> >(Path.Combine(_contentRootPath, "Infrastructure", "Data", "Import",
                                                                 "emtias.json"));

            foreach (var emtia in emtias)
            {
                var country        = context.Set <Country>().FirstOrDefault(c => c.Code == "TR");
                var investmentTool = new InvestmentTool(emtia.Name, emtia.Title, "", InvestmentToolType.Emtia.EnumId);
                context.Set <InvestmentTool>().Add(investmentTool);
            }
            context.SaveChanges();
        }
Exemplo n.º 3
0
        private void ImportStocks(ImsContext context)
        {
            var stocks = GetJson <List <StockSeed> >(Path.Combine(_contentRootPath, "Infrastructure", "Data", "Import",
                                                                  "stocks.json"));

            foreach (var stock in stocks)
            {
                var country        = context.Set <Country>().FirstOrDefault(c => c.Code == "TR");
                var investmentTool = new InvestmentTool(stock.Code, stock.Name, "", InvestmentToolType.Stock.EnumId);
                context.Set <InvestmentTool>().Add(investmentTool);
            }
            context.SaveChanges();
        }