小编use*_*957的帖子

Linq加入iquery,如何使用defaultifempty

我有一个linq连接查询wriiten,我想取值,如果其中一个是空的...

码:

var Details = 

UnitOfWork.FlightDetails
          .Query()
          .Join
          (
              PassengersDetails,
              x => x.Flightno,
              y => y.FlightNo,
              (x, y) => new
              {
                  y.PassengerId,
                  y.classType,
                  x.Flightno,
                  x.FlightName,
              }
          );
Run Code Online (Sandbox Code Playgroud)

我想用...

"Above query".DefaultIfEmpty
(
    new 
    {
        y.PassengerId,
        y.classType,
        string.Empty,
        string.Empty
    }
);
Run Code Online (Sandbox Code Playgroud)

"FlightDetails"是类上的Idatarepository类型,"PassengerDetails"是可查询的局部变量结果.如何获得乘客ID和Classtype的结果,并且整体结果中不包含flightno和flightname.

c# linq asp.net-mvc-4

29
推荐指数
1
解决办法
6万
查看次数

Jquery在按钮单击时设置表的宽度

我有这样的桌子..

<table id="content" style ="border:none>
            <tr>
                <td>
                    <table  id="content_medium" style ="width:100%">
                        <tr class="grid_heading">
                            <th class="student">Students</th>
                            <th class="year">Year</th>
                            <th class="group">Roll Group</th>
                            <th class="Type">Session</th>
                        </tr>
                    </table>
                </td>
            </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

如何使用jquery更改表的宽度..我有按钮,单击时应添加宽度100%,并在下次单击时删除宽度属性..

喜欢?

function openpartialView() {
            $(".content").addcss("width","100%");
    }
function closepartialView() {
            $(".content").removecss("width", "100%");
    }
Run Code Online (Sandbox Code Playgroud)

jquery html5

1
推荐指数
1
解决办法
3546
查看次数

标签 统计

asp.net-mvc-4 ×1

c# ×1

html5 ×1

jquery ×1

linq ×1