小编Ran*_*ngh的帖子

找不到方法:'System.String RazorEngine.Templating.ITemplate.Run

我正在尝试新的Azure移动应用程序.在Azure中创建实例,然后下载Visual Studio包.通过Nuget更新了所有组件.现在,当我运行它时,我得到以下错误:

<Error><Message>An error has occurred.</Message><ExceptionMessage>Method not found: 'System.String RazorEngine.Templating.ITemplate.Run(RazorEngine.Templating.ExecuteContext)'.</ExceptionMessage><ExceptionType>System.MissingMethodException</ExceptionType><StackTrace>   at Microsoft.Azure.Mobile.Server.Content.HtmlActionResult.ExecuteAsync(CancellationToken cancellationToken)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End …
Run Code Online (Sandbox Code Playgroud)

c# azure azure-mobile-services razorengine

5
推荐指数
1
解决办法
746
查看次数

JToken 获取特定值

我有以下 JToken 输出。如何从 TenantID 中检索此处的“值”,在这种情况下应为 1?

{[
 {
  "value": 1,
  "metadata": {
   "userType": 0,
   "flags": 8,
   "type": {
    "type": "INT4",
    "name": "Int",
    "id": 56
   },
   "colName": "TenantID"
  }
 }
]}
Run Code Online (Sandbox Code Playgroud)

这是我当前的代码:

        JToken value;
        if (usr.Profile.TryGetValue("tenantid", out value))
        {
            JObject inner = value["value"].Value<JObject>(); //not working with null error
            User.TenantID = (string)value;
        }
        User.obj = usr.Profile;
Run Code Online (Sandbox Code Playgroud)

编辑 - 请在下面找到完整的 JToken 输出:

    {[
    {
    "value": 1,
    "metadata": {
      "userType": 0,
      "flags": 8,
      "type": {
        "type": "INT4",
        "name": "Int",
        "id": 56
      },
      "colName": "TenantID" …
Run Code Online (Sandbox Code Playgroud)

c# json

4
推荐指数
2
解决办法
1万
查看次数

具有视图或存储过程的Azure移动应用中的脱机数据同步

我们已经创建了Xamarin Forms应用程序,目前仅在Android上运行。后端是.Net Azure移动应用程序服务

我从文章中了解到,脱机数据同步仅适用于“ / tables”端点。(至少那是我的理解)

但是我的API公开了联接查询(实体关系)中的数据以及一些存储过程中的数据。这是否意味着这些不适用于当前的SDK?我有什么选择?

我是否公开表并处理客户端中联接的业务逻辑?

c# stored-procedures xamarin.android azure-mobile-services xamarin.forms

3
推荐指数
1
解决办法
1544
查看次数