public async Task <IActionResult> GetUserRoles([FromQuery] UserRoleParameters roleParameters) { var getAllUserRolesQuery = new GetAllUserRolesQuery(roleParameters); var result = await mediator.Send(getAllUserRolesQuery); if (result.Code == HttpStatusCode.OK) { Response.Headers.Add("X-Pagination", PagedList <Entity> .ToJson(result.Value as PagedList <Entity>)); } return(StatusCode((int)result.Code, result.Value)); }
/// <summary> /// Initializes a new instance of the <see cref="GetAllUserRolesQuery"/> class. /// </summary> /// <param name="roleParameters">The role parameters.</param> public GetAllUserRolesQuery(UserRoleParameters roleParameters) { RoleParameters = roleParameters; }
public Task <PagedList <Entity> > GetAllUserRoles(UserRoleParameters roleParameters) { return(null);//await FindByCondition(role => role.Id.Equals(roleId)).ToListAsync(); }