Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 /// <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();
 }