예제 #1
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new PokerISContext(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <PokerISContext> >()))
            {
                // Look for any tables.
                if (context.Table.Any())
                {
                    return;   // DB has been seeded
                }

                context.Table.AddRange(
                    new Table
                {
                    Seats       = 8,
                    StartingBet = 50
                }
                    );
                context.SaveChanges();
            }
        }
예제 #2
0
 public GameController(PokerISContext context)
 {
     _context = context;
 }
예제 #3
0
 public MemberController(PokerISContext context)
 {
     _context = context;
 }
예제 #4
0
 public TableController(PokerISContext context)
 {
     _context = context;
 }