Пример #1
0
        static SimpleDataContext()
        {
            DemoData = new SimpleDataContext();
            User jon = new User { UserName = "******", Password = "******", Id = Guid.NewGuid() };
            User rob = new User { UserName = "******", Password = "******", Id = Guid.NewGuid() };

            DemoData.Users = new List<User> { jon, rob };
            DemoData.Holdings = new List<UserStockHolding>
            {
                new UserStockHolding { UserId = jon.Id, Ticker = "acme", Quantity = 20 },
                new UserStockHolding { UserId = jon.Id, Ticker = "abcd", Quantity = 5 },
                new UserStockHolding { UserId = jon.Id, Ticker = "efgh", Quantity = 10 },
                new UserStockHolding { UserId = jon.Id, Ticker = "ijkl", Quantity = 1 },
                new UserStockHolding { UserId = jon.Id, Ticker = "mnop", Quantity = 15 },
                new UserStockHolding { UserId = rob.Id, Ticker = "acme", Quantity = 5 },
                new UserStockHolding { UserId = rob.Id, Ticker = "xyz", Quantity = 10 },
                new UserStockHolding { UserId = rob.Id, Ticker = "tkpb", Quantity = 3 }
            };

            DemoData.Prices = new List<StockPrice>
            {
                new StockPrice { Ticker = "acme", Price = 10.50m },
                new StockPrice { Ticker = "abcd", Price = 13.92m },
                new StockPrice { Ticker = "xyz", Price = 5.67m },
                new StockPrice { Ticker = "tkpb", Price = 58.95m },
                new StockPrice { Ticker = "ijkl", Price = 10m },
                new StockPrice { Ticker = "mnop", Price = 20m }
            };
        }
Пример #2
0
 public SimpleStockPriceService()
 {
     data = SimpleDataContext.DemoData;
 }
 public SimpleStockPriceService()
 {
     data = SimpleDataContext.DemoData;
 }
Пример #4
0
        static SimpleDataContext()
        {
            DemoData = new SimpleDataContext();
            User jon = new User {
                UserName = "******", Password = "******", Id = Guid.NewGuid()
            };
            User rob = new User {
                UserName = "******", Password = "******", Id = Guid.NewGuid()
            };

            DemoData.Users = new List <User> {
                jon, rob
            };
            DemoData.Holdings = new List <UserStockHolding>
            {
                new UserStockHolding {
                    UserId = jon.Id, Ticker = "acme", Quantity = 20
                },
                new UserStockHolding {
                    UserId = jon.Id, Ticker = "abcd", Quantity = 5
                },
                new UserStockHolding {
                    UserId = jon.Id, Ticker = "efgh", Quantity = 10
                },
                new UserStockHolding {
                    UserId = jon.Id, Ticker = "ijkl", Quantity = 1
                },
                new UserStockHolding {
                    UserId = jon.Id, Ticker = "mnop", Quantity = 15
                },
                new UserStockHolding {
                    UserId = rob.Id, Ticker = "acme", Quantity = 5
                },
                new UserStockHolding {
                    UserId = rob.Id, Ticker = "xyz", Quantity = 10
                },
                new UserStockHolding {
                    UserId = rob.Id, Ticker = "tkpb", Quantity = 3
                }
            };

            DemoData.Prices = new List <StockPrice>
            {
                new StockPrice {
                    Ticker = "acme", Price = 10.50m
                },
                new StockPrice {
                    Ticker = "abcd", Price = 13.92m
                },
                new StockPrice {
                    Ticker = "xyz", Price = 5.67m
                },
                new StockPrice {
                    Ticker = "tkpb", Price = 58.95m
                },
                new StockPrice {
                    Ticker = "ijkl", Price = 10m
                },
                new StockPrice {
                    Ticker = "mnop", Price = 20m
                }
            };
        }
 public SimpleAuthenticationService()
 {
     data = SimpleDataContext.DemoData;
 }
 public SimpleStockPortfolioService()
 {
     data = SimpleDataContext.DemoData;
 }
Пример #7
0
 public SimpleAuthenticationService()
 {
     data = SimpleDataContext.DemoData;
 }
 public SimpleStockPortfolioService()
 {
     data = SimpleDataContext.DemoData;
 }