Sure. Its two methods. One for the actual service and the other to create the query.
public async Task<PagedResultDto<EmployeeListDto>> OpenEmployeeDirectory(GetEmployeePagedInput input)
{
var query = CreateEmployeeDirectoryQuery(input);
var employeeList = await query
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
var employeeCount = await query.CountAsync();
return new PagedResultDto<EmployeeListDto>
(employeeCount, ObjectMapper.Map<List<EmployeeListDto>>(employeeList));
}
private IQueryable<Employee> CreateEmployeeDirectoryQuery(GetEmployeePagedInput input)
{
var query = _employeeRepository.GetAll()
.Select(e => new Employee
{
Id = e.Id,
ProId = e.ProId,
FirstName = e.FirstName,
LastName = e.LastName,
WorkPhone = e.WorkPhone,
WorkExtension = e.WorkExtension,
EmployeeEmail = e.EmployeeEmail,
Department = e.Department,
Division = e.Division,
SupervisorName = e.SupervisorName
});
query = query
.WhereIf(!input.Filter.IsNullOrWhiteSpace(), pc => pc.FirstName.Contains(input.Filter) ||
pc.LastName.Contains(input.Filter) ||
pc.EmployeeStatus.Contains(input.Filter) ||
pc.EmployeeEmail.Contains(input.Filter));
return query;
}
Have you figured the build issue yet? I am having the same issues.
@ismcagdas just created one here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/349">https://github.com/aspnetzero/aspnet-ze ... issues/349</a>
Thank you
Okay, seems like a security risk to me.
I figured out my first issue. My service proxy was removed in my merge from proxies.module.ts. But still having some other issues.
As I am trying to switch my tables from the jtable to PrimeNG. I am getting a ERROR Error: Uncaught (in promise): Error: No provider for PediaSuiteServiceProxy!
Which is my main service. Any ideas why?
I got it working. I wasn't thinking. I forgot to set the solution to start multiple projects and have it start both the host and public site.
That is perfect. Thank you. Not sure how I missed that. I went through the documentation for a few hours one day. Must have just glanced over that part.
Okay great, thank you
Basically I wanted to make sure nothing else was making requests to the API but the Angular app.