常用方法
常用方法
常用方法
常用方法
public async Task SeedPokemons() { if (!await _pokeDbRepository.Any()) { var jsonResults = await RequestPokemonsFromApi(); var entities = _mapper.Map <List <DAL.DbContext.Entities.Pokemon> >(jsonResults); _pokeDbRepository.AddRange(entities); await _pokeDbRepository.Save(); } }