Base solution for your next web application

Activities of "ramcharan"

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&lt;Person&gt; _personRepository;

    public PersonAppService(IRepository&lt;Person&gt; personRepository)
    {
        _personRepository = personRepository;
    }

    public ListResultOutput&lt;PersonListDto&gt; 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&lt;PersonListDto&gt;(persons.MapTo&lt;List&lt;PersonListDto&gt;>());
    }
}

}

The text i mentioned in bold is getting error. Please help out asap.

Showing 1 to 2 of 2 entries