我希望Domain Service Class显示我的实体,以便我可以让它为我生成CRUD。为什么没有出现?
项目结构:
EF模型位于类库中 POCO(.tt)位于另一个类库
中
现在我手动创建了CRUD操作,但是我想让对话框创建它们。
@Akash Kava:这是其中一个pocos的主键:
[DataMember]
public int CVAdvancementQuotientId
{
get { return _cVAdvancementQuotientId; }
set
{
if (_cVAdvancementQuotientId != value)
{
if (ChangeTracker.ChangeTrackingEnabled && ChangeTracker.State != ObjectState.Added)
{
throw new InvalidOperationException("The property 'CVAdvancementQuotientId' is part of the object's key and cannot be changed. Changes to key properties can only be made when the object is not being tracked or is in the Added state.");
}
_cVAdvancementQuotientId = value;
OnPropertyChanged("CVAdvancementQuotientId");
}
}
}
private int _cVAdvancementQuotientId;
答案 0 :(得分:0)
答案 1 :(得分:0)
^^使您的代码CodeGenerationStrategy成为默认值而不是没有>删除EF模型中的.tt文件>>重建>>实体将显示