【发布时间】:2021-12-14 02:18:48
【问题描述】:
我有一个使用字符串变量作为支持字段的 JObject。
public class StaticTable
{
public int StaticTableId { get; set; }
private string _staticData;
public JObject StaticData
{
get => JsonConvert.DeserializeObject<JObject>(string.IsNullOrEmpty(_staticData) ? "{}" : _staticData);
set => _staticData = value.ToString();
}
}
运行迁移时,我收到以下异常:
System.InvalidOperationException: Property 'JObject.Next' is not virtual. 'UseChangeTrackingProxies' requires all entity types to be public, unsealed, have virtual properties, and have a public or protected constructor. 'UseLazyLoadingProxies' requires only the navigation properties be virtual.
【问题讨论】:
标签: c# .net-core entity-framework-core