Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Parse.Com并获取关系数据_C#_Parse Platform_Relation - Fatal编程技术网

C# Parse.Com并获取关系数据

C# Parse.Com并获取关系数据,c#,parse-platform,relation,C#,Parse Platform,Relation,我有以下代码: using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using OpenFridge.Portable.Data.Interfaces.Entities; using OpenFridge.Portable.Data.Parse.Entities; using Parse; using AutoMapper; namespace OpenFr

我有以下代码:

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using OpenFridge.Portable.Data.Interfaces.Entities;
using OpenFridge.Portable.Data.Parse.Entities;
using Parse;
using AutoMapper;

namespace OpenFridge.Portable.Data.Parse.Entities
{
    [ParseClassName("_User")]
    public class ParseUserEntity : ParseUserEntityBase, IUserEntity
    {
        private string _password;
        [ParseFieldName("password")]
        public new string Password
        {
            get { return _password; }
            set
            {
                _password = value;
                base.Password = value;
            }
        }

        Lazy<IEnumerable<IBankAccountEntity>> _bankAccounts;
        [ParseFieldName("bankAccounts")]
        public Lazy<IEnumerable<IBankAccountEntity>> BankAccounts
        {
            get
            {
                var relation = GetRelation<ParseBankAccountEntity>("BankAccount");
                if (relation == null) return null;
                var result = relation.Query.FindAsync().Result;
                var _bankAccounts = new Lazy<IEnumerable<IBankAccountEntity>>(() => relation.Query.FindAsync().Result);
                return _bankAccounts;
            }
            set
            {
                _bankAccounts = value;
            }
        }
    }
}
所以。。这是虫子吗?。。我是做错了还是用错了

有什么想法吗

比尔, 因克斯

relation.Query.FindAsync().Result