sos
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using ConsoleApp1.data.model;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Type = ConsoleApp1.data.model.Type;
|
||||
|
||||
namespace ConsoleApp1.data;
|
||||
|
||||
public class PokemonContext : DbContext
|
||||
{
|
||||
public DbSet<Type> Types { get; set; }
|
||||
public DbSet<Stat> Stats { get; set; }
|
||||
public DbSet<Ability> Abilities { get; set; }
|
||||
|
||||
public DbSet<Pokemon> Pokemons { get; set; }
|
||||
public DbSet<PokemonType> PokemonsTypes { get; set; }
|
||||
public DbSet<PokemonStat> PokemonsStats { get; set; }
|
||||
public DbSet<PokemonAbility> PokemonsAbilitys { get; set; }
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
optionsBuilder.UseNpgsql("Username=postgres;Password=mysecretpassword;Host=localhost:5432;Database=postgres;");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user