ICustomerRepository

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

Interface for customer repository.

public interface ICustomerRepository : IGenericRepository<Customer>

Implements

IGenericRepository<Customer>

Methods

Delete(IEnumerable<int>)

Deletes the given list of customers from the repository. Begins tracking the given list of customers in the Detached state such that it will be deleted in the database when SaveChanges() is called.

void Delete(IEnumerable<int> customerIds)

Parameters

NameDescription

The customer Identifiers to delete.

GetAsync(DateTime?, DateTime?, int?, int?, string, string)

Asynchronously gets a list of customers from this repository.

Task<List<Customer>> GetAsync(DateTime? start, DateTime? end, int? skip, int? take, string include = "", string orderBy = "")

Parameters

NameDescription

(Optional) Specifies a filter for customer created after a given start date.

(Optional) Specifies a filter for customer created before a given end date.

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

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

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

(Optional) Order by expression.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains the list of customers found.

GetByCodeAsync(string)

Asynchronously gets the Customer with the given code value. If no Customer entity is found in the context or the store, then null is returned.

Task<Customer> GetByCodeAsync(string code)

Parameters

NameDescription

The customer code of the customer to be found.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains the Customer found, or null.

GetLicensesByCustomerCodeAsync(string)

Asynchronously gets the licenses for a given customer code.

Task<IList<License>> GetLicensesByCustomerCodeAsync(string code)

Parameters

NameDescription

The customer code.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains the list of License found, or null.

GetOrdersByCustomerCodeAsync(string)

Asynchronously gets the orders for a given customer code.

Task<IList<Order>> GetOrdersByCustomerCodeAsync(string code)

Parameters

NameDescription

The customer code.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains the list of Order found, or null.

GetProductsByCustomerCodeAsync(string)

Asynchronously gets the products for a given customer code.

Task<IList<Product>> GetProductsByCustomerCodeAsync(string code)

Parameters

NameDescription

The customer code.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains the list of Product found, or null.

Last updated