public FindRoleConfigurationsResponse Find(FindRoleConfigurationsRequest request) { try { _roleConfigurationQuery.WithRole(request.RoleId); _roleConfigurationQuery.WithPermission(request.PermissionId); _roleConfigurationQuery.WithAccessLevel(request.AccessLevelId); _roleConfigurationQuery.Sort(request.Sort, request.SortBy); var totalRecords = _roleConfigurationQuery.TotalRecords(); _roleConfigurationQuery.Paginate(request.StartPage, request.EndPage); var roleConfigurations = _roleConfigurationQuery.Execute(); return(new FindRoleConfigurationsResponse { RoleConfigurations = TypeAdapter.Adapt <List <RoleConfigurationResponse> >(roleConfigurations), TotalRecords = totalRecords }); } catch (DataAccessException) { throw new ApplicationException(); } }
public FindRoleConfigurationsResponse Get(FindRoleConfigurationsRequest request) { return(_roleConfigurationService.Find(request)); }