Base solution for your next web application
Open Closed

Expression parameter in JavaScript #72

cosmic created

Hi, I have this app service:

public ListResultOutput<RecordDto> GetAllFilter(Expression<Func<Record, bool>> predicate)
    var items = _recordRepository.GetAllList(predicate);

    return new ListResultOutput<RecordDto>
        Items = items.MapTo<List<RecordDto>>()

I tried call this service from JavaScript code, but it didn't work:{
    return r.recordType = 20;
}).done(function (data) {
    for (var i = 0; i < data.items.length; i++) {
        records.push([i, data.items[i].points]);

How I can call this service from JavaScript code right way? Is it possible?

1 Answer(s)
  • 0
    hikalkan created
    Support Team


    It's beyond capabilities of dynamic web api layer. Also, you can not do it with simply ASP.NET Web API as I know. You can use BreezeJs or OData for querying server data from client. While it's not scope of ABP, there is no reason to not to use any library within an ABP based solution.