Был сделан запрос POST для создание записи о принтере

This commit is contained in:
Hukuta committed 2026-05-05 23:47:36 +09:00
1 parent 7a0e7e0801
commit 02160f451f
43 files changed
+1044 -634

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using CartriX.Shared.Models;
namespace CartriX.Shared.Classes
{
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions options) : base(options) { }
public DbSet<Printer> Printers { get; set; }
public DbSet<PrinterModel> PrinterModels { get; set; }
public DbSet<Location> Locations { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Location>().HasIndex(l => l.name).IsUnique();
base.OnModelCreating(modelBuilder);
}
}
}