C# 使用Linq组合多个字段

C# 使用Linq组合多个字段,c#,linq,C#,Linq,我想组合几个表字段以生成组合值 这是我的密码: from _showtime in db.tbl_Concert_Showtime join _concerthall in db.tbl_Concert_ConcertHall on _showtime.ConcertHallID equals _concerthall.ConcertHallID join _hall in db.tbl_Concert_Hall on _concerthall.HallID e

我想组合几个表字段以生成组合值

这是我的密码:

from _showtime in db.tbl_Concert_Showtime join _concerthall in db.tbl_Concert_ConcertHall on _showtime.ConcertHallID equals _concerthall.ConcertHallID
                 join _hall in db.tbl_Concert_Hall on _concerthall.HallID equals _hall.HallID
                 join _hallfloor in db.tbl_Concert_Hall_Floor on _hall.HallID equals _hallfloor.HallID
                 join _place in db.tbl_Concert_Hall_Floor_Place on _hallfloor.FloorID equals _place.FloorID
                 where _place.PlaceID == id
                 select _showtime
showtime
表包括
showID
startdate
starttime
endtime
字段

如何在字段中选择
startdate
starttime

类似这样:
2015/12/12 12:25->12:58

from _showtime in db.tbl_blablabla    
select _showtime.startdate + " " + _showtime.starttime + " -> " + _showtime.enddate
如果您想保留原来的Showtime对象,但只需添加该组合值,请执行以下操作:

from _showtime in db.tbl_blablabla    
select new 
{
    Showtime = _Showtime, 
    CombinedValue = _showtime.startdate + " " + _showtime.starttime + " -> " + _showtime.enddate
}
如果您想保留原来的Showtime对象,但只需添加该组合值,请执行以下操作:

from _showtime in db.tbl_blablabla    
select new 
{
    Showtime = _Showtime, 
    CombinedValue = _showtime.startdate + " " + _showtime.starttime + " -> " + _showtime.enddate
}
如果您想保留原来的Showtime对象,但只需添加该组合值,请执行以下操作:

from _showtime in db.tbl_blablabla    
select new 
{
    Showtime = _Showtime, 
    CombinedValue = _showtime.startdate + " " + _showtime.starttime + " -> " + _showtime.enddate
}
如果您想保留原来的Showtime对象,但只需添加该组合值,请执行以下操作:

from _showtime in db.tbl_blablabla    
select new 
{
    Showtime = _Showtime, 
    CombinedValue = _showtime.startdate + " " + _showtime.starttime + " -> " + _showtime.enddate
}

如何选择新字段的名称?像showID和NewSeveral field,在这个上下文中,你的名字是什么意思?结果将只是一个或多个字符串。我想在下拉列表中显示结果。我需要为value和NewSeveral(_showtime.startdate++++_showtime.starttime++“->”++_showtime.enddate)设置一个showID字段,以便显示如何选择新字段的名称?像showID和NewSeveral field,在这个上下文中,你的名字是什么意思?结果将只是一个或多个字符串。我想在下拉列表中显示结果。我需要为value和NewSeveral(_showtime.startdate++++_showtime.starttime++“->”++_showtime.enddate)设置一个showID字段,以便显示如何选择新字段的名称?像showID和NewSeveral field,在这个上下文中,你的名字是什么意思?结果将只是一个或多个字符串。我想在下拉列表中显示结果。我需要为value和NewSeveral(_showtime.startdate++++_showtime.starttime++“->”++_showtime.enddate)设置一个showID字段,以便显示如何选择新字段的名称?像showID和NewSeveral field,在这个上下文中,你的名字是什么意思?结果将只是一个或多个字符串。我想在下拉列表中显示结果。我需要为value和NewSeveral(_showtime.startdate++++_showtime.starttime++“->”++_showtime.enddate)创建一个showID文件以进行显示