=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
+16
View File
@@ -10,17 +10,20 @@ public interface IDefaultRepository<T, in TS> where T : class
/// Returns the <see cref="DbSet{T}"/> for entity type <typeparamref name="T"/>, enabling querying and persistence operations against the corresponding table.
/// </summary>
/// <returns>A <see cref="DbSet{T}"/> instance for the entity type <typeparamref name="T"/>.</returns>
/// <!-- aidoc:v1 sig=ec00daf -->
DbSet<T> GetSet();
/// <summary>
/// Gets an <see cref="IQueryable{T}"/> representing the queryable source of items, allowing callers to compose additional query operations.
/// </summary>
/// <returns>An <see cref="IQueryable{T}"/> that can be used to build and execute queries against the underlying data source.</returns>
/// <!-- aidoc:v1 sig=f6cc40d -->
IQueryable<T> Query();
/// <summary>
/// Returns a queryable collection of <typeparamref name="T"/> items, optionally applying the specified pagination filter to control paging behavior.
/// </summary>
/// <param name="filter">The pagination filter that controls paging of the returned items, or <c>null</c> to omit pagination.</param>
/// <returns>An <see cref="IQueryable{T}"/> that can be used to enumerate the items with the applied filter.</returns>
/// <!-- aidoc:v1 sig=1ebc2e6 -->
IQueryable<T> Query(PaginationFilter? filter);
/// <summary>
/// Returns a paginated queryable sequence of items based on the specified page and page size.
@@ -28,6 +31,7 @@ public interface IDefaultRepository<T, in TS> where T : class
/// <param name="currentPage">The current page number; when null, pagination may be ignored or handled accordingly.</param>
/// <param name="pageSize">The number of items per page; when null, a default page size may be used.</param>
/// <returns>An <see cref="IQueryable{T}"/> representing the requested page of items.</returns>
/// <!-- aidoc:v1 sig=864e936 -->
IQueryable<T> Query(int? currentPage, int? pageSize = null);
/// <summary>
@@ -36,6 +40,7 @@ public interface IDefaultRepository<T, in TS> where T : class
/// <param name="id">The identifier of the entity to look up.</param>
/// <param name="includeExpressions">Expressions that specify related entities to include in the returned result.</param>
/// <returns>The entity matching the supplied identifier, or <c>null</c> if no entity is found.</returns>
/// <!-- aidoc:v1 sig=512b7c5 -->
T? GetById(TS id, params Expression<Func<T, object>>[] includeExpressions);
/// <summary>
@@ -45,6 +50,7 @@ public interface IDefaultRepository<T, in TS> where T : class
/// <param name="id">The identifier of type <typeparamref name="TS"/> used to locate the entity.</param>
/// <param name="queryCustomizer">A customizer that controls how the underlying query is constructed and executed.</param>
/// <returns>The matching entity of type <typeparamref name="T"/>, or <c>null</c> if no entity with the given <paramref name="id"/> is found.</returns>
/// <!-- aidoc:v1 sig=aaf08fe -->
T? GetById(TS id, QueryCustomizer<T> queryCustomizer);
/*[Obsolete("Use GetById(<S> id) instead")]
@@ -57,55 +63,65 @@ public interface IDefaultRepository<T, in TS> where T : class
/// </summary>
/// <param name="keyValues">The values that compose the primary key of the entity to retrieve.</param>
/// <returns>The matching entity of type <typeparamref name="T"/>, or <c>null</c> if no entity is found.</returns>
/// <!-- aidoc:v1 sig=830c24f -->
T? GetByIds(params object[] keyValues);
/// <summary>
/// Creates a new instance of type T based on the specified source object.
/// </summary>
/// <param name="obj">The source object used to create the new instance.</param>
/// <returns>A new instance of type T created from the specified object.</returns>
/// <!-- aidoc:v1 sig=8ea5182 -->
T Create(T obj);
/// <summary>
/// Creates a list of objects based on the provided collection of input items.
/// </summary>
/// <param name="objs">The list of input objects to be created.</param>
/// <returns>A list of created objects of type <typeparamref name="T"/>.</returns>
/// <!-- aidoc:v1 sig=d9289fe -->
List<T> Create(List<T> objs);
/// <summary>
/// Deletes the specified object from the underlying data source and returns the result.
/// </summary>
/// <param name="obj">The object of type <typeparamref name="T"/> to be deleted.</param>
/// <returns>The object of type <typeparamref name="T"/> representing the result of the delete operation.</returns>
/// <!-- aidoc:v1 sig=da00ac2 -->
T Delete(T obj);
/// <summary>
/// Deletes the specified collection of objects.
/// </summary>
/// <param name="objs">The collection of objects to delete.</param>
/// <returns>A list of the deleted objects.</returns>
/// <!-- aidoc:v1 sig=e26006d -->
List<T> Delete(ICollection<T> objs);
/// <summary>
/// Deletes all records or entries managed by the associated repository or service.
/// </summary>
/// <!-- aidoc:v1 sig=dab2212 -->
void DeleteAll();
/// <summary>
/// Updates the specified entity in the underlying store and returns the updated instance.
/// </summary>
/// <param name="obj">The entity instance containing the updated values to persist.</param>
/// <returns>The updated entity of type <typeparamref name="T"/> as returned by the operation.</returns>
/// <!-- aidoc:v1 sig=ea86cad -->
T Update(T obj);
/// <summary>
/// Gets the total number of items in the collection.
/// </summary>
/// <returns>The total count of items.</returns>
/// <!-- aidoc:v1 sig=b8f191e -->
int Count();
/// <summary>
/// Returns the number of items that match the specified status.
/// </summary>
/// <param name="status">The status value used to filter the items being counted.</param>
/// <returns>The total count of items matching the specified status.</returns>
/// <!-- aidoc:v1 sig=c2a0590 -->
int Count(string status);
/// <summary>
/// Retrieves all entities of type <typeparamref name="T"/> and returns them as a list.
/// </summary>
/// <returns>A <see cref="List{T}"/> containing all entities of type <typeparamref name="T"/>; an empty list if none are found.</returns>
/// <!-- aidoc:v1 sig=3045be0 -->
List<T> FindAll();
}