mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 12:30:55 +00:00
Сделал список OID адресов, добавил миграцию бд при запуске программы
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user