GetCountByServiceIdFilteredByUser()
Retrieve the number of service requests filtered by service id and user id
Description
This method is used to retrieve the int number of service requests that are filtered by service ID and user ID. Overrides include the ability to further filter by organization ID.
Package Details
Interface
IServiceRequestManager
Syntax
ServiceRequestManager.GetCountByServiceIdFilteredByUser(int serviceId, int userId);
ServiceRequestManager.GetCountByServiceIdFilteredByUser(int serviceId, int organizationId, int userId);
Returns
Task<int>
API Endpoint
[GET] /api/v1/users/{id}/servicerequests
Parameters
Parameter | Description | Type |
---|---|---|
serviceId | id of the current service | int |
organizationId | id of the current organization | int |
userId | id of the current user | int |
Returns
200 - Ok
Example
using MTOA.BLL.Interfaces;
int serviceId = 123;
int organizationId = 567;
var serviceRequestCount = await _serviceRequestManager.GetCountByServiceIdFilteredByUser(serviceId, organizationId, CurrentUser.Id);