【发布时间】:2012-06-22 14:41:47
【问题描述】:
使用 ASP.NET Web-Api,我的控制器中有以下 POST 设置。从 Fiddler 发布到它时,我收到错误消息:
The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.
...当它到达 var auth = dba.ApiMembers... 行时
// POST api/Avail
[BasicAuthentication]
public HttpResponseMessage PostAvail(Avail[] avail)
{
if (ModelState.IsValid)
{
// Check if authorised
var auth = dba.ApiMembers.Where(a => a.hotel_id ==
avail[0].HID && a.UserName == User.Identity.Name)
.FirstOrDefault();
谁能看出这条线有什么问题?
【问题讨论】:
标签: asp.net asp.net-mvc asp.net-web-api