Сделал диалоговое окно добавления принтера

This commit is contained in:
Hukuta committed 2026-05-08 01:06:06 +09:00
1 parent 17e4794160
commit 88f53c793e
78 files changed
+854 -60572

No files matched your search

+6
View File
@@ -12,10 +12,16 @@ namespace CartriX.Shared.Classes
public DbSet<Location> Locations { get; set; }
public DbSet<Cartridge> Cartridges { get; set; }
public DbSet<CartridgeModel> CartridgeModels { get; set; }
public DbSet<PrintType> PrintTypes { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Location>().HasIndex(l => l.name).IsUnique();
modelBuilder.Entity<PrintType>().HasData(
new PrintType { id = 1, name = "Laser" },
new PrintType { id = 2, name = "Inkjet" }
);
base.OnModelCreating(modelBuilder);
}