Hi
I tried to use SubSunsonic.ActiveRecord in SL3 project that uses .NET RIA Services. However when I try to return some IQuerable in DomainService class I get an error that the classes generated by Subsonic have a property 'Columns' with an unsupported type. That's what I have
public IEnumerable<SE_NorthWind.SuperEmployee> GetIntegers()
{
return SE_NorthWind.SuperEmployee.All()
.Where(emp => emp.Issues > 100)
.OrderBy(emp => emp.EmployeeID);
}
And this is the error I get
Error 7 Entity 'SE_NorthWind.SuperEmployee' has a property 'Columns' with an unsupported type. SuperEmployee
Any idea what to do? Don't really wanna use Linq to SQL :)
Thx
P.S. Just tried to LinqTemplates from SubSonic, but this solution I get the error
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
of course SuperEmployee table has a primary key, cause the classes generated by SubSonic can see it
...
Columns.Add(new DatabaseColumn("EmployeeID", this)
{
IsPrimaryKey = true,
DataType = DbType.Int32,
IsNullable = false,
AutoIncrement = true,
IsForeignKey = false,
MaxLength = 0
});
...
But RIA objects, they need some attributes. I guess I'll have to go with native Linq To SQL until SubSonic adapts to all this :(