私はMVCアプリケーションを開発していますが、開発中にEF4.0を使用しました。モデルからクラスを作成しました。ここで、MVCで作成されたクラスごとにクラスを追加したいと思います。
元。以下のコードでは、クラスLocationを取得します。ここで、もう1つのクラス(部分クラス)を作成したいのですが、部分クラスのプロパティをオーバーライドするにはどうすればよいですか?
どうやってするか ?
namespace Entities
{
public partial class Location
{
public int Id { get; set; }
public string Name { get; set; }
public string Remark { get; set; }
public string State { get; set; }
public string Region { get; set; }
public string PinCode { get; set; }
public virtual ICollection<Comment> Comments { get; set; }
}
}