20 lines
621 B
C#
20 lines
621 B
C#
using AccountsDataBaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AccountsDataBaseImplement
|
|
{
|
|
public class AccountsDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
=> optionsBuilder.UseNpgsql("Host=localhost;Database=AccountsDB;Username=postgres;Password=postgres");
|
|
|
|
public virtual DbSet<Account> Accounts { set; get; }
|
|
public virtual DbSet<Interest> Interests { set; get; }
|
|
}
|
|
}
|