Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ramezani583"

THANK YOU VERY MUCH.

when i use .getall(), a new error occurs!

but i have compile Error in this way:

public async Task<PagedResultDto<ProvinceListDto>> GetProvinces(GetProvincesInput input)
        {
            var query = _provinceRepository
             .WhereIf
                    !input.Filter.IsNullOrWhiteSpace(),
                    p =>
                        p.Name.Contains(input.Filter)
                );
            var provinceCount = await query.CountAsync();

            var provinces = await query
                .OrderBy(input.Sorting)
                .PageBy(input)
                .ToListAsync();

            var provinceListDtos = ObjectMapper.Map<List<ProvinceListDto>>(provinces);

            return new PagedResultDto<ProvinceListDto>(
                provinceCount,
                provinceListDtos
                );
        }

hi, i want get all record count for Grid Paging like this command " var provinceCount = await query.CountAsync();" but when write method

public class ProvinceAppService : ResourceAssessmentsNetworkAppServiceBase, IProvinceAppService
    {
 public IAsyncQueryableExecuter AsyncQueryableExecuter { get; set; }
        private readonly IRepository<Province> _provinceRepository;

        public ProvinceAppService(IRepository<Province> provinceRepository)
        {
            _provinceRepository = provinceRepository;
            AsyncQueryableExecuter = NullAsyncQueryableExecuter.Instance;

        }
public async Task<PagedResultDto<ProvinceListDto>> GetProvinces(GetProvincesInput input)
        {
            var query = _provinceRepository
              **<span style="color:#BF0000">  .WhereIf(</span>**
                    !input.Filter.IsNullOrWhiteSpace(),
                    p =>
                        p.Name.Contains(input.Filter)
                );
            var provinceCount = await query.CountAsync();

            var provinces = await query
                .OrderBy(input.Sorting)
                .PageBy(input)
                .ToListAsync();

            var provinceListDtos = ObjectMapper.Map<List<ProvinceListDto>>(provinces);

            return new PagedResultDto<ProvinceListDto>(
                provinceCount,
                provinceListDtos
                );
        }
{

I have error in ".WhereIf" <ins>'IRepository<Province>' does not contain a definition for 'WhereIf' and no extension method 'WhereIf' accepting a first argument of type 'IRepository<Province>' could be found (are you missing a using directive or an assembly reference?)</ins>

I forced to write this method as follows:

public class ProvinceAppService : ResourceAssessmentsNetworkAppServiceBase, IProvinceAppService
    {
 public IAsyncQueryableExecuter AsyncQueryableExecuter { get; set; }
        private readonly IRepository<Province> _provinceRepository;

        public ProvinceAppService(IRepository<Province> provinceRepository)
        {
            _provinceRepository = provinceRepository;
            AsyncQueryableExecuter = NullAsyncQueryableExecuter.Instance;

        }
public async Task<PagedResultDto<ProvinceListDto>> GetProvinces(GetProvincesInput input)
        {
            var query = _provinceRepository
                .GetAll()
                .WhereIf(
                    !input.Filter.IsNullOrWhiteSpace(),
                    p =>
                        p.Name.Contains(input.Filter)
                );
            var provinceCount = await query.CountAsync();

            var query1 = _provinceRepository
                .GetAll()
                .WhereIf(
                    !input.Filter.IsNullOrWhiteSpace(),
                    p =>
                        p.Name.Contains(input.Filter)
                )
                .OrderBy(p => input.Sorting)
                .PageBy(input);
            var provinces = await AsyncQueryableExecuter.ToListAsync(query1);


            var provinceListDtos = ObjectMapper.Map<List<ProvinceListDto>>(provinces);

            return new PagedResultDto<ProvinceListDto>(
                provinceCount,
                provinceListDtos
                );
        }
}

How can I fix this problem? Is there a better way?

Server and client-side files are attached. ServerSideCode.rar ClientSideCode.rar

yes, this is startead to happend after i add Province.component.html,Province.component.ts. this files are attached in main.rar

I've run, but the problem has notbeen resolved!

hi, I corrected some of the problems, but I can not bind data to the grid. And I can not find the problem. I tried to implement (Province.component.html,Province.component.ts) such as Usersforms(users.component.html, users.component.ts).

I have attached the relevant codes.

Of course I know that this problem is not related to Abp and is related to Angular, but I'm glad to help me. thanks. main.rar

Hi, It looks like I'm mistaken in defining the .TS or .Html files or in the call its. How can I track the error in client side code? I know that the entity's methods defined on the server side are completely correct. But I do not know how to trace and debug the client side!

my project type is: asp.net core & angular (v5.0.4)

I did it, but the problem did not fix!

Showing 31 to 40 of 85 entries