我正在使用WebApi应用程序,我在其中编写了一个方法来使用以下代码获取学生:
public Student GetStudent(string studentId)
{
var student = this.context.Students.FirstOrDefault(x => x.Id == Guid.Parse(studentId));
return student;
}
Run Code Online (Sandbox Code Playgroud)
这里studentId来自WebApi电话.但是,当我尝试运行此应用程序时,它会抛出一个异常,例如:
附加信息:LINQ to Entities无法识别方法'System.Guid Parse(System.String)'方法,并且此方法无法转换为存储表达式.
有没有人告诉我为什么会这样,我该如何解决这个问题?
我是新手,Powershell正在尝试编写一个Powershell脚本,该脚本将自动将Web应用程序部署到Windows服务器。但是我没有找到任何好的IDE。现在我正在使用Notepad ++,但是没有调试功能。是否有Powershell具有调试功能的IDE或编辑器?