Сделал список OID адресов, добавил миграцию бд при запуске программы

This commit is contained in:
HK committed 2026-06-09 16:24:10 +09:00
1 parent 48e625819a
commit bd426d2647
35 files changed
+927 -46

No files matched your search

@@ -1,10 +1,11 @@
using CartriX.Shared.Models.Location;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace CartriX.Api.Controllers.Location
{
public class LocationService(AppDbContext _context) : ILocationService
{
public async Task<List<Entities.Location>> List() => await _context.Locations.Include(l => l.Printers).ThenInclude(p => p.Model).ThenInclude(m => m.Manufacturer).ToListAsync();
}
public async Task<List<Entities.Location>> List() => await _context.Locations.Include(l => l.Printers).ToListAsync();
public async Task<List<Entities.Printer>> PrintersList(int LocationId) => await _context.Printers.Include(p => p.Status).Include(p => p.Model).Where(p => p.Location.Id == LocationId).ToListAsync();
}
}