IOrderRepository

Namespace: Babel.Data Assembly: Babel.Data.dll

Interface for order repository.

public interface IOrderRepository : IGenericRepository<Order>

Implements

IGenericRepository<Order>

Methods

Delete(IEnumerable<int>)

Deletes a list of order with the given primary key values. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.

void Delete(IEnumerable<int> orderIds)

Parameters

NameDescription

orderIds IEnumerable<int>

The order primary key ids to delete.

DeleteResourceAsync(int, IEnumerable<int>)

Asynchronously deletes the resources for a given order. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.

Task DeleteResourceAsync(int orderId, IEnumerable<int> resourcesIds)

Parameters

NameDescription

orderId int

The order primary key.

resourcesIds IEnumerable<int>

List of resources primary keys.

Returns

NameDescription

A task that represents the asynchronous delete operation.

GetResourcesAsync(int)

Asynchronously gets a list of resources for the given order.

Task<List<Resource>> GetResourcesAsync(int orderId)

Parameters

NameDescription

orderId int

The order primary key.

Returns

NameDescription

An asynchronous result that yields the order resources.

InsertResourceAsync(int, Resource)

Asynchronously insert the given resource in the repository for the specified order.

Task<Order> InsertResourceAsync(int orderId, Resource resource)

Parameters

NameDescription

orderId int

The order primary key.

resource Resource

The resource to add.

Returns

NameDescription

A task that represents the asynchronous insert operation.

QueryProductsAsync(int, string, string, string, string, int?, int?, CancellationToken)

Asynchronously query a list of ProductOrder for a given order.

Task<List<ProductOrder>> QueryProductsAsync(int orderId, string select = null, string filter = null, string orderBy = null, string includeProperties = "", int? skip = null, int? take = null, CancellationToken cancellationToken = default)

Parameters

NameDescription

orderId int

Specifies the orde id.

select string

(Optional) Specifies a select expression.

filter string

(Optional) Specifies the filter expression.

orderBy string

(Optional) Order by expression.

includeProperties string

(Optional) A comma separated list of nested entity names to retrieve.

skip int?

(Optional) The number of records to skip before the first record found.

take int?

(Optional) The number of records to take after the first record found.

cancellationToken CancellationToken

(Optional) A token that allows processing to be cancelled.

Returns

NameDescription

A task that represents the asynchronous get operation.

Last updated