/// <summary> /// Initializes context, unit of work and images /// </summary> private void Initialize() { Context = new BJDBContext(); UnitOfWork = new UnitOfWork(Context); imgDeck.Source = ImageUtilities.ToWpfBitmap(Properties.Resources.b2fv); imgDiscard.Source = ImageUtilities.ToWpfBitmap(Properties.Resources.jb); }
/// <summary> /// Default constructor /// </summary> /// <param name="context">Context to use</param> public UnitOfWork(BJDBContext context) { _context = context; Cards = new CardRepository(_context); Decks = new DeckRepository(_context); Games = new GameRepository(_context); Players = new PlayerRepository(_context); }