CS0019 C#操作员&&&'不能应用于' string'类型的操作数和'字符串'

时间:2018-01-19 08:40:42

标签: asp.net linq

任何人都可以帮我解决此问题:

.service('CommunFunctionsService', function(){
    var s = {};
    s.getData = function() {
        // do something
    }
    return s;
})

.controller('FirstCtrl', function(CommonFunctionsService, $scope){
    $scope.getData = function(){
        CommunFunctionsService.getData();
    }
})

.controller('SecondController', function(CommonFunctionsService, $scope){
    $scope.getDataToo= function(){
        CommunFunctionsService.getData();
    }
})

我想选择纬度和经度值。

1 个答案:

答案 0 :(得分:2)

这将选择列并返回匿名类型。

.Select(b => new { Longitude = b.Longitude, Latitude = b.Latitude })