mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 12:30:55 +00:00
24 lines
685 B
C#
24 lines
685 B
C#
using CartriX.Api.Interfaces;
|
|
using CartriX.Shared.Classes;
|
|
using CartriX.Shared.Mappers;
|
|
using CartriX.Shared.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Migrations.Operations;
|
|
|
|
namespace CartriX.Api.Services
|
|
{
|
|
public class LocationService : ILocationService
|
|
{
|
|
private readonly AppDbContext _context;
|
|
public LocationService(AppDbContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
public async Task<List<Location>> GetAll()
|
|
{
|
|
var result = await _context.Locations.Include(l => l.printers).ThenInclude(p => p.model).ToListAsync();
|
|
return result;
|
|
}
|
|
}
|
|
}
|