.NET RIAサービスを使用するSL3プロジェクトでSubSunsonic.ActiveRecordを使用しようとしました。 しかし、私がDomainServiceクラスでIQuerableを返そうとすると、Subsonicによって生成されたクラスに、サポートされていない型の 'Columns'プロパティがあるというエラーが発生します。 私はRIA DomainService + ActiveRecord
Error 7 Entity 'SE_NorthWind.SuperEmployee' has a property 'Columns' with an unsupported type. SuperEmployee
に何をするか、任意のアイデアを得るそれは私が
public IEnumerable<SE_NorthWind.SuperEmployee> GetIntegers()
{
return SE_NorthWind.SuperEmployee.All()
.Where(emp => emp.Issues > 100)
.OrderBy(emp => emp.EmployeeID);
}
持っているものだと、これは誤りですか?本当にLinqをSQLに使用したくないのですか?
Thx
P.S.ただ、主キーを持っている、亜音速によって生成されたクラスは、それを見ることができる原因と亜音速からLinqTemplatesしようとしましたが、このソリューションは、私が
Error 4 The entity 'SE_NorthWind.SuperEmployee' does not have a key defined. Entities exposed by DomainService operations must have must have at least one property marked with the KeyAttribute. SuperEmployee
コースSuperEmployeeテーブルのエラーを取得
...
Columns.Add(new DatabaseColumn("EmployeeID", this)
{
IsPrimaryKey = true,
DataType = DbType.Int32,
IsNullable = false,
AutoIncrement = true,
IsForeignKey = false,
MaxLength = 0
});
...
しかし、RIAオブジェクト、彼らはいくつかの属性が必要です。私は亜音速は、あなたの質問の後半部分に答えるために、このすべて:(