我對Neo4J和此客戶非常陌生,開始瞭解事物的竅門,但遇到了一個奇怪的問題。我有一個像下面無法使用值對象創建實體
public class MemberAccount : Entity<MemberAccount>, IValidatable
{
public string StudioName { get; set; }
public string EmailAddress { get; set; }
public string OwnerFirstName { get; set; }
public string OwnerLastName { get; set; }
public MemberAccountType AccountType { get; set; }
public string Password { get; set; }
public string PostCode { get; set; }
[JsonProperty("PrimaryPhone")]
public PhoneNumber PrimaryPhone { get; set; }
}
實體基本上它彷彿在******中國值對象是造成create語句失敗,下面的錯誤
System.ArgumentNullException:值不能爲空。參數名稱:在System.Uri..ctor(字符串uriString中)在 Neo4jClient.GraphClient.GetLastPathSegment(字符串URI)在 Ç uriString中:\ TeamCity的\ buildAgent \工作\ f1c4cf3efbf1b05e \ Neo4jClient \ GraphClient.cs: 線686在Neo4jClient.GraphClient.Create(TNODE節點, IEnumerable的
1 relationships, IEnumerable
1 indexEntries)在 C:\ TeamCity的\ buildAgent \工作\ f1c4cf3efbf1b05e \ Neo4jClient \ GraphClient.cs:在 StudioBooker.Persistence.Repository.Studio.Neo4JRepositories.Neo4JMemberAccountRepository 線334 .Save(MemberAccount memberAccount)in Neo4JMemberAccountRepository.cs:line 29 at StudioBooker.Persistence.Tests.Neo4JRepositoryTests.Neo4JMemberAccountRepositoryTests.SaveTest() 在Neo4JMemberAccountRepositoryTests.cs:行31
通過newtonsoft產生的JSON這就是看起來像
{
"StudioName": "Studio",
"EmailAddress": "[email protected]",
"OwnerFirstName": "Test",
"OwnerLastName": "Test",
"AccountType": 1,
"Password": "Password",
"PostCode": "W3 6AE",
"PrimaryPhone": {
"AreaCode": "01491",
"Number": "651321"
},
"Id": "00000000-0000-0000-0000-000000000000"
}
我strugging理解爲什麼上面的堆棧跟蹤發生是由於我想象它只是一個簡單的財產,儘管客戶會擔心,但必須有更多。任何幫助,將不勝感激:)
感謝