private DataTable GetRuleCategoryTable()
{
// RuleCategory rc = new RuleCategory();
DataTable dtRuleCategory = _fixture.Build<DataTable>()
.With(x => x.Columns.Add("RuleCategoryName", typeof(System.String)))
.With(x => x.Columns.Add("OrganizationID", typeof(System.Int32)))
.With(x => x.Columns.Add("RuleEntryCode", typeof(System.Int32)))
.With(x => x.Columns.Add("IsActive", typeof(System.Boolean)))
.With(x => x.Columns.Add("RuleCategoryLookupId", typeof(System.Boolean)))
.Create();
return dtRuleCategory;
}
以上代码抛出异常 -
表达式的Body不是成员表达式。
这很可能是因为它不代表对属性或字段的访问