Files
FA_WEB/SytelineSaAppEfDataModel/Services/EdiLogService.cs
trencik91 0199467f72 * Extended of Dtos
* Added new Services and Controllers
2025-09-03 15:04:22 +02:00

15 lines
459 B
C#

using AutoMapper;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Entities;
namespace SytelineSaAppEfDataModel.Services;
public class EdiLogService(SytelineSaAppDbContext context, IMapper mapper) : IEdiLogService
{
public async Task<bool> AddEdiLog(EdiLogDto ediLog)
{
var entity = mapper.Map<EdiLog>(ediLog);
await context.EdiLogs.AddAsync(entity);
return await context.SaveChangesAsync() > 0;
}
}