Files
FA_WEB/SytelineSaAppEfDataModel/Services/EdiCustomerOrderImportService.cs
Piotr Kus 6139ce97d7 * Added new Entities and Dtos
* Mapping new classes
* Added new services and Controllers in API
2025-08-07 06:46:43 +02:00

13 lines
462 B
C#

using AutoMapper;
using Microsoft.EntityFrameworkCore;
namespace SytelineSaAppEfDataModel.Services;
public class EdiCustomerOrderImportService(SytelineSaAppDbContext context, IMapper mapper) : IEdiCustomerOrderImportService
{
public async Task<DateTime> GetLastUpdateDate()
{
return (await context.EdiCustomerOrderImports.OrderByDescending(x => x.LastUpdateDate)
.FirstOrDefaultAsync())?.LastUpdateDate ?? DateTime.Now.Date;
}
}