initial commit

This commit is contained in:
2026-07-21 14:35:37 +07:00
commit 0027997ff9
798 changed files with 59083 additions and 0 deletions
@@ -0,0 +1,28 @@
using Indotalent.Infrastructure.Database;
using MediatR;
using Microsoft.EntityFrameworkCore;
namespace Indotalent.Features.Serilogs.Database;
public record DeleteSerilogLogsAllCommand() : IRequest<bool>;
public class DeleteSerilogLogsHandler :
IRequestHandler<DeleteSerilogLogsAllCommand, bool>
{
private readonly AppDbContext _context;
public DeleteSerilogLogsHandler(AppDbContext context)
{
_context = context;
}
public async Task<bool> Handle(DeleteSerilogLogsAllCommand request, CancellationToken cancellationToken)
{
await _context.Database.ExecuteSqlRawAsync("TRUNCATE TABLE SerilogLogs", cancellationToken);
return true;
}
}