using AutoMapper; using Microsoft.EntityFrameworkCore; using SytelineSaAppEfDataModel.Dtos; namespace SytelineSaAppEfDataModel.Services; public class EdiCustomerOrderTranslateService(SytelineSaAppDbContext context, IMapper mapper) : IEdiCustomerOrderTranslateService { public async Task> GetAll() { return await context.EdiCustomerOrderTranslates.Select(x => mapper.Map(x)) .ToListAsync(); } public async Task Delete(int id) { var entity = await context.EdiCustomerOrderTranslates.FindAsync(id); if (entity != null) { context.EdiCustomerOrderTranslates.Remove(entity); await context.SaveChangesAsync(); } } }