Get() [ServiceRequestManager]

Retrieve a list of service requests filtered by user

Description

This method is used to retrieve a list of service requests that are filtered by user ID. Overrides include the ability to further filter by service ID, page number, and page size.

Package Details

Interface

IServiceRequestManager

Syntax

ServiceRequestManager.Get<T>(int userId) where T : IServiceRequestMetadata ServiceRequestManager.Get<T>(int userId, int serviceId) where T : IServiceRequestMetadata ServiceRequestManager.Get<T>(int userId, int serviceId, int page, int pageSize) where T : IServiceRequestMetadata;

Returns

ICollection<MTOA.DomainObjects.ServiceRequest>

API Endpoint

[GET] /api/v1/users/{id}/servicerequests

Returns

200 - Ok

Example

using MTOA.BLL.Interfaces; int myServiceId = 123; int pageNumber = 1; int pageSize = 20; var serviceRequests = await _serviceRequestManager.Get<ServiceRequest>(CurrentUser.Id, myServiceId, pageNumber, pageSize);