Merge branch 'LabWork02' of http://student.git.athene.tech/devil_1nc/PIbd-23_Dolgov_D.A._SoftwareInstallation into LabWork02
This commit is contained in:
commit
fee8277358
@ -1,28 +0,0 @@
|
||||
using AbstractPackageInstallationDatabaseImplement.Models;
|
||||
using AbstractSoftwareInstallationDatabaseImplement.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AbstractSoftwareInstallationDatabaseImplement
|
||||
{
|
||||
public class AbstractSoftwareInstallationDatabase : DbContext
|
||||
{
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder
|
||||
optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseNpgsql("Host = localhost; Port = 5432; Database = SoftwareInstallation; Username = postgres; Password = postgres");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
public virtual DbSet<Software> Softwares { set; get; }
|
||||
public virtual DbSet<Package> Packages { set; get; }
|
||||
public virtual DbSet<PackageSoftware> PackageSoftwares { set; get; }
|
||||
public virtual DbSet<Order> Orders { set; get; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user