有没有办法让只读字段或没有设置器的属性映射到具有实体框架代码优先的数据库列?
我发现两者都被忽略了,例如:
using System;
namespace App.Model
{
public class Person
{
string _address1; // Private Field to back the Address Property
public string Address1 // Public Property without a Setter
{
get { return _address1; }
}
public readonly string Address2; // Public Read Only Field
}
}
是否有 Fluent API 调用或其他方法来完成?