15 lines
459 B
C#
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;
|
|
}
|
|
} |