generated from admin/template
начал
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PokedexApi.Data.Models;
|
||||
using Type = PokedexApi.Data.Models.Type;
|
||||
|
||||
namespace PokedexApi.Data;
|
||||
|
||||
public class PokemonContext: DbContext
|
||||
{
|
||||
public DbSet<Type> Types { get; set; }
|
||||
public DbSet<Pokemon> Pokemons { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
optionsBuilder.UseNpgsql("Username=postgres;Password=123;Host=localhost:5432;Database=postgres");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user