public CharacterRepository(CryptsDbContext context, ICharacterStat characterStat, IWeapon weapon, ILocation location) { _context = context; _characterStat = characterStat; _weapon = weapon; _location = location; }
public DatabaseTest() { _connection = new SqliteConnection("Filename=:memory:"); _connection.Open(); _db = new CryptsDbContext( new DbContextOptionsBuilder <CryptsDbContext>() .UseSqlite(_connection) .Options); _db.Database.EnsureCreated(); _character = new CharacterRepository(_db, _characterStat, _weapon, _location); _characterStat = new CharacterStatRepository(_db, _stat); _stat = new StatRepository(_db); _location = new LocationsRepository(_db, _enemy); _item = new ItemRepository(_db); _weapon = new WeaponRepository(_db); _enemy = new EnemyRepository(_db); }
public CharacterStatsController(ICharacterStat characterStat, ICharacter character, ILog log) { _characterStat = characterStat; _character = character; _log = log; }