这是我正在尝试使用的代码
@{
var db = Database.Open("StarterSite");
var sqlquery = "SELECT Dep FROM UserProfile WHERE Email = @0";
}
@if(db.Query(sqlquery,WebSecurity.CurrentUserName) = "Quebec")
{
Response.Redirect("~/Members/Quebec/Quebec");
return;
}
else if(db.Query(sqlquery,WebSecurity.CurrentUserName) = "Laval")
{
Response.Redirect("~/Members/Laval/Laval");
return;
}
它给了我一个 CS0131 错误......我做错了什么?