using CartriX.Api.Classes; using CartriX.Api.Entities; using CartriX.Api.Interfaces; using Microsoft.EntityFrameworkCore; namespace CartriX.Api.Services { public class PrinterService : IPrinterService { private readonly AppDbContext _context; public PrinterService(AppDbContext context) { _context = context; } public async Task AddAsync(DTOs.Printer.AddPrinter requestDto) { return true; } public async Task GetAsync(int id) => await _context.Printers.Include(l => l.location).Include(m => m.model).FirstAsync(p => p.id == id); public async Task> GetModelsAsync() => await _context.PrinterModels.Select(m => m.name).ToListAsync(); public async Task> GetPrintTypesAsync() => await _context.PrintTypes.ToListAsync(); } }