* Extended of Dtos
* Added new Services and Controllers
This commit is contained in:
15
SytelineSaAppEfDataModel/Services/EdiLogService.cs
Normal file
15
SytelineSaAppEfDataModel/Services/EdiLogService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user