public AuthenticationController( IUnitOfWork unitOfWork, IAuthenticationService authService, IURIService URIService, ITokenService tokenService ) { _unitOfWork = unitOfWork; _authService = authService; _URIService = URIService; _tokenService = tokenService; }
public static PagedResponse <T> CreatePagedResponse <T>(IURIService URIService, PageFilter filter, List <T> responses, string path) { if (filter == null || filter.PageNumber < 1 || filter.PageSize < 1) { return(new PagedResponse <T>(responses)); } string nextPage = filter.PageNumber >= 1 ? URIService.GetPaginationURI(path, new PaginationQuery(filter.PageNumber + 1, filter.PageSize)).ToString() : null; string previousPage = filter.PageNumber - 1 >= 1 ? URIService.GetPaginationURI(path, new PaginationQuery(filter.PageNumber - 1, filter.PageSize)).ToString() : null; return(new PagedResponse <T>() { Data = responses, PageNumber = filter.PageNumber >= 1 ? filter.PageNumber : (int?)null, PageSize = filter.PageSize >= 1 ? filter.PageSize : (int?)null, NextPage = responses.Any() ? nextPage : null, PreviousPage = previousPage }); }
public OrganisationsController(IUnitOfWork unitOfWork, IMapper mapper, IURIService URIService) { _unitOfWork = unitOfWork; _mapper = mapper; _URIService = URIService; }
public UsersController(IUnitOfWork unitOfWork, IMapper mapper, IURIService URIService) { _unitOfWork = unitOfWork; _mapper = mapper; _URIService = URIService; }