using AutoMapper; using Microsoft.EntityFrameworkCore; using SytelineSaAppEfDataModel.Dtos; using SytelineSaAppEfDataModel.Entities; namespace SytelineSaAppEfDataModel.Services; public class WzRowMeyleService(SytelineSaAppDbContext context, IMapper mapper) : IWzRowMeyleService { public async Task> GetAll() { return await context.WzRowsMeyle.Select(x => mapper.Map(x)).ToListAsync(); } public async Task CreateRows(IEnumerable rows) { var entities = mapper.Map>(rows); await context.WzRowsMeyle.AddRangeAsync(entities); await context.SaveChangesAsync(); } }