add girIgnore

This commit is contained in:
jrojas
2026-06-23 19:03:17 +02:00
parent 52335cc5fa
commit 95c9039c78
321 changed files with 84 additions and 12748 deletions
@@ -0,0 +1,19 @@
using audit.Model;
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MongoDB.Driver;
namespace audit_logs.Repositories.Interfaces;
public interface IAuditRecordRepository : IMongoRepository<AuditRecord>
{
new Task InsertOneAsync(AuditRecord auditRecord);
Task DeleteBeforeDate(DateTime date);
Task<long> InsertBatch(IEnumerable<AuditRecord> auditRecords);
Task<List<AuditRecord>> FindAllFromOrigin(ObjectId originId);
Task<List<AuditRecord>> GetAllAuditRecordsAsync();
Task<List<AuditRecord>> GetPaginatedAsync(int pageNumber, int pageSize);
Task<long> CountDocumentsAsync(); // Nuevo método para contar documentos
}
+16
View File
@@ -0,0 +1,16 @@
namespace audit_logs.Repositories.Interfaces;
using MongoDB.Bson;
using MongoDB.Driver;
public interface IMongoRepository<T>
{
IMongoCollection<T> Collection { get; }
string GetCollectionName();
Task InsertOneAsync(T obj);
Task<T?> DeleteAsync(ObjectId id);
Task UpdateOneAsync(ObjectId id, T obj);
Task<IEnumerable<T>> GetPaginatedAsync(int pageNumber, int pageSize,FilterDefinition<T>? filter = null, SortDefinition<T> sort=null);
Task<long> CountDocumentsAsync(FilterDefinition<T>? filter = null);
}