I got a class with [SubSonicIgnore]:
[SubSonicIgnore]
public string Name
{
get
{
return (FirstName ?? string.Empty) + ((MiddleName ?? string.Empty).Length > 0 ? " " + MiddleName + " " : " ") + (SurName ?? string.Empty);
}
}
whenver I run my test:
[Test]
public void Can_Sort()
{
IUserRepository _repo = new SqlUserRepository();
var users = _repo.GetUsers().OrderBy("Name");
It always yield an error:
TestQueryableSorter.Can_Sort : FailedSystem.NotSupportedException: The member 'Name' is not supported
I notice that it only breaks on those properties which has [SubSonicIgnore]. Is this a bug or by design?
I used the class from C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples\LinqSamples\DynamicQuery.