mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 12:30:55 +00:00
Сделал диалоговое окно добавления принтера
This commit is contained in:
1 parent
17e4794160
commit
88f53c793e
78 files changed
+854
-60572
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user