mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
12 lines
505 B
C#
12 lines
505 B
C#
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).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();
|
|
}
|
|
}
|