# Interface IDefaultRepository<T, TS>

Namespace
  adas_core.Domain

Assembly
  adas-core.Domain.dll

    public interface IDefaultRepository<T, in TS> where T : class

#### Type Parameters

`T`
`TS`

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### Count()

Gets the total number of items in the collection.

    int Count()

#### Returns

int

  The total count of items.

### Count(string)

Returns the number of items that match the specified status.

    int Count(string status)

#### Parameters

`status` string

  The status value used to filter the items being counted.

#### Returns

int

  The total count of items matching the specified status.

### Create(List<T>)

Creates a list of objects based on the provided collection of input items.

    List<T> Create(List<T> objs)

#### Parameters

`objs` List<T>

  The list of input objects to be created.

#### Returns

List<T>

  A list of created objects of type `T`.

### Create(T)

Creates a new instance of type T based on the specified source object.

    T Create(T obj)

#### Parameters

`obj` T

  The source object used to create the new instance.

#### Returns

T

  A new instance of type T created from the specified object.

### Delete(ICollection<T>)

Deletes the specified collection of objects.

    List<T> Delete(ICollection<T> objs)

#### Parameters

`objs` ICollection<T>

  The collection of objects to delete.

#### Returns

List<T>

  A list of the deleted objects.

### Delete(T)

Deletes the specified object from the underlying data source and returns the result.

    T Delete(T obj)

#### Parameters

`obj` T

  The object of type `T` to be deleted.

#### Returns

T

  The object of type `T` representing the result of the delete operation.

### DeleteAll()

Deletes all records or entries managed by the associated repository or service.

    void DeleteAll()

### FindAll()

Retrieves all entities of type `T` and returns them as a list.

    List<T> FindAll()

#### Returns

List<T>

  A List<T> containing all entities of type `T`; an empty list if none are found.

### GetById(TS, params Expression<Func<T, object>>[])

Retrieves an entity of type `T` by its identifier, optionally eager-loading related entities via the provided include expressions.

    T? GetById(TS id, params Expression<Func<T, object>>[] includeExpressions)

#### Parameters

`id` TS

  The identifier of the entity to look up.

`includeExpressions` Expression<Func<T, object>>[]

  Expressions that specify related entities to include in the returned result.

#### Returns

T

  The entity matching the supplied identifier, or `null` if no entity is found.

### GetById(TS, QueryCustomizer<T>)

Retrieves an entity of type `T` by its identifier, returning `null` when no matching record is found. The lookup is performed using the provided QueryCustomizer<T> to allow caller-specific query adjustments such as includes, filters, or tracking settings.

    T? GetById(TS id, QueryCustomizer<T> queryCustomizer)

#### Parameters

`id` TS

  The identifier of type `TS` used to locate the entity.

`queryCustomizer` QueryCustomizer<T>

  A customizer that controls how the underlying query is constructed and executed.

#### Returns

T

  The matching entity of type `T`, or `null` if no entity with the given `id` is found.

### GetByIds(params object[])

Retrieves an entity of type `T` by its composite key values, returning `null` if no matching entity is found.

    T? GetByIds(params object[] keyValues)

#### Parameters

`keyValues` object[]

  The values that compose the primary key of the entity to retrieve.

#### Returns

T

  The matching entity of type `T`, or `null` if no entity is found.

### GetSet()

Returns the DbSet<TEntity> for entity type `T`, enabling querying and persistence operations against the corresponding table.

    DbSet<T> GetSet()

#### Returns

DbSet<T>

  A DbSet<TEntity> instance for the entity type `T`.

### Query()

Gets an IQueryable<T> representing the queryable source of items, allowing callers to compose additional query operations.

    IQueryable<T> Query()

#### Returns

IQueryable<T>

  An IQueryable<T> that can be used to build and execute queries against the underlying data source.

### Query(int?, int?)

Returns a paginated queryable sequence of items based on the specified page and page size.

    IQueryable<T> Query(int? currentPage, int? pageSize = null)

#### Parameters

`currentPage` int?

  The current page number; when null, pagination may be ignored or handled accordingly.

`pageSize` int?

  The number of items per page; when null, a default page size may be used.

#### Returns

IQueryable<T>

  An IQueryable<T> representing the requested page of items.

### Query(PaginationFilter?)

Returns a queryable collection of `T` items, optionally applying the specified pagination filter to control paging behavior.

    IQueryable<T> Query(PaginationFilter? filter)

#### Parameters

`filter` PaginationFilter

  The pagination filter that controls paging of the returned items, or `null` to omit pagination.

#### Returns

IQueryable<T>

  An IQueryable<T> that can be used to enumerate the items with the applied filter.

### Update(T)

Updates the specified entity in the underlying store and returns the updated instance.

    T Update(T obj)

#### Parameters

`obj` T

  The entity instance containing the updated values to persist.

#### Returns

T

  The updated entity of type `T` as returned by the operation.