21 lines
698 B
C#
21 lines
698 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; }
|
|
public virtual DbSet<AccountInterest> AccountInterests { set; get; }
|
|
}
|
|
}
|