Пример #1
0
        public void Inicializar()
        {
            var _option = new DbContextOptionsBuilder <CoreContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;

            _contexto        = new CoreContext(_option);
            _jugadorServicio = new JugadorServicio(new JugadorRepositorio(_contexto));
            _partidaServicio = new PartidaServicio(new PartidaRepositorio(_contexto));

            _juego = new Juego(_partidaServicio, _jugadorServicio);
        }
 public PartidaController(IPartidaServicio partidaServicio)
 {
     _partidaServicio = partidaServicio;
 }
Пример #3
0
 public Juego(IPartidaServicio partidaServicio, IJugadorServicio jugadorServicio)
 {
     _partidaServicio = partidaServicio;
     _jugadorServicio = jugadorServicio;
 }