фиксим ошибки
This commit is contained in:
parent
e2bef71132
commit
57600bd351
@ -38,7 +38,7 @@ namespace VeterinaryDatabaseImplement.Models
|
||||
public virtual List<PurchasePet> Pets { get; set; } = new();
|
||||
[ForeignKey("PurchaseId")]
|
||||
public virtual List<Drug> Drugs { get; set; } = new();
|
||||
public static Purchase? Create(VeterenaryDatabase context, PurchaseBindingModel model)
|
||||
public static Purchase? Create(VeterinaryDatabase context, PurchaseBindingModel model)
|
||||
{
|
||||
return new Purchase()
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ namespace VeterinaryDatabaseImplement.Models
|
||||
}
|
||||
[ForeignKey("VisitId")]
|
||||
public virtual List<VisitPet> Pets { get; set; } = new();
|
||||
public static Visit? Create(VisitVeterenaryDatabase context, VisitBindingModel model)
|
||||
public static Visit? Create(VeterinaryDatabase context, VisitBindingModel model)
|
||||
{
|
||||
return new Visit()
|
||||
{
|
||||
|
@ -3,13 +3,13 @@ using VeterinaryDatabaseImplement.Models;
|
||||
|
||||
namespace VeterinaryDatabaseImplement
|
||||
{
|
||||
public class VeterenaryDatabase : DbContext
|
||||
public class VeterinaryDatabase : DbContext
|
||||
{
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=VeterenaryDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"
|
||||
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=VeterinaryDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"
|
||||
);
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
Loading…
Reference in New Issue
Block a user