IEnumerable<Addresses> AddressSet1=myServices.GetAddresses(LocationId1);
IEnumerable<Addresses> AddressSet2=myServices.GetAddresses(LocationId2);
我想上面的两个AddressSets结合
我试图IEnumerable<Addresses> AllAddresses=AddressSet1.Concat(AddressSet2)
但在此之后,当我尝试从IEnumerable的AllAddresses访问项目通过我的Razor视图
@if(!myHelper.IsNullorEmpty(model.AllAddresses )
{
@Html.EditorFor(model => model.AllAddresses )
}
而我得到的错误 - 路径。任何建议非法字符来确定该错误的原因是什么?
如果我想用出的毗连我能看到AddressSet1 / AddressSet2记录运行我的网页显示在页面上。但是,当我尝试将两者结合起来,形成我可枚举AllAddresses,它是引发错误,请帮助
粘贴下面是我的编辑模板
@model MyServiceRole.Models.Addresses
@{
ViewBag.Title = "All addresses Items";
}
<table>
<tr>
<td>
<span>Index</span>
</td>
<td>
</tr>
<tr>
<td>Address XID</td>
<td>
@Html.EditorFor(model => model.AddressID)
</td>
</tr>
<tr>
<td>Title</td>
<td>
@Html.EditorFor(model => model.Title)
</td>
</tr>
<tr>
<td>Description</td>
<td>
@Html.EditorFor(model => model.Description)
</td>
</tr>
<tr>
<td>Image URL</td>
<td>
@Html.EditorFor(model => model.Photo.URL)
</td>
</tr>
</table>