} //ConsoleApp UI static void Main(string[] args) { var context = new HangManDbContext(); context.Database.EnsureCreated(); _colorify = new Format(Theme.Light); //-----Dependancy injection------- IPlayerManager playerManager = new PlayerManager(context); IMessagesRepository messagesRepository = new MessagesRepository(); IManageDb manageDb = new ManageDb(context); IHiddenWordManager hiddenWordManager = new HiddenWordManager(); IGameManager gameManager = new GameManager(playerManager, messagesRepository, manageDb, hiddenWordManager); //-------------------------------- gameManager.PlayerLogin(); gameManager.StartHangMan(); }
public PlayerManager(HangManDbContext dbContext) { _dbContext = dbContext; dbContext.Database.EnsureCreated(); }
public ManageDb(HangManDbContext dbContext) { _dbContext = dbContext; }