I find it out. Thank You
Hi
I too have the same problem. But i used Abp.Linq.Extensions and im getting error as There is no argument given that corresponds to the required formal parameter 'value' of 'string.IsNullOrEmpty(string)'
My code is using Abp.Application.Services; using Abp.Application.Services.Dto; using Abp.AutoMapper; using BCITS.BsmartWater.Storage; using Abp.Domain.Repositories; using Abp.Collections.Extensions; using Abp.Linq.Extensions; using System.Collections.Generic; using System.Linq;
namespace BCITS.BsmartWater { public interface IPersonAppService : IApplicationService { ListResultOutput<PersonListDto> GetPeople(GetPeopleInput input); } public class GetPeopleInput : IInputDto { public string Filter { get; set; } }
[AutoMapFrom(typeof(Person))]
public class PersonListDto : FullAuditedEntityDto
{
public string Name { get; set; }
public string Surname { get; set; }
public string EmailAddress { get; set; }
}
public class PersonAppService : BsmartWaterAppServiceBase, IPersonAppService
{
private readonly IRepository<Person> _personRepository;
public PersonAppService(IRepository<Person> personRepository)
{
_personRepository = personRepository;
}
public ListResultOutput<PersonListDto> GetPeople(GetPeopleInput input)
{
var persons = _personRepository
.GetAll()
.WhereIf(
!input.Filter.**IsNullOrEmpty**(),
p => p.Name.Contains(input.Filter) ||
p.Surname.Contains(input.Filter) ||
p.EmailAddress.Contains(input.Filter)
)
.OrderBy(p => p.Name)
.ThenBy(p => p.Surname)
.ToList();
return new ListResultOutput<PersonListDto>(persons.MapTo<List<PersonListDto>>());
}
}
}
The text i mentioned in bold is getting error. Please help out asap.