что-то типа бд?
This commit is contained in:
parent
9309e6d97c
commit
8efea67920
@ -1,12 +1,33 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicDatabaseImplement.Models;
|
||||
|
||||
namespace VetclinicDatabaseImplement
|
||||
{
|
||||
internal class VetclinicDatabase
|
||||
{
|
||||
}
|
||||
public class VetсlinicDatabase : DbContext
|
||||
{
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=VetClinicDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
public virtual DbSet<Animal> Animals { set; get; }
|
||||
public virtual DbSet<AnimalDrugPurchase> AnimalDrugPurchases { set; get; }
|
||||
public virtual DbSet<Client> Clients { set; get; }
|
||||
public virtual DbSet<Drug> Drugs { set; get; }
|
||||
public virtual DbSet<DrugMedicines> DrugMedicines { set; get; }
|
||||
public virtual DbSet<DrugPurchase> DrugPurchases { set; get; }
|
||||
public virtual DbSet<Doctor> Doctors { set; get; }
|
||||
public virtual DbSet<Service> Services { set; get; }
|
||||
public virtual DbSet<Medicine> Medicines { set; get; }
|
||||
public virtual DbSet<ServiceMedicines> ServiceMedicines { set; get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user