mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
17 lines
502 B
C#
17 lines
502 B
C#
using CartriX.Api.Interfaces;
|
|
using CartriX.Api.Classes;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace CartriX.Api.Services
|
|
{
|
|
public class LocationService : ILocationService
|
|
{
|
|
private readonly AppDbContext _context;
|
|
public LocationService(AppDbContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
public async Task<List<Entities.Location>> List() => await _context.Locations.Include(l => l.printers).ThenInclude(p => p.model).ToListAsync();
|
|
}
|
|
}
|