This question is locked. New answers and comments are not allowed.
I'm using Windows 7 x64, Visual Studio 2012 Update 3, Telerik OpenAccess Q3 2013, MySQL 5.6, .NET 4.5 and C#.
I've done two tables in MySQL.
- Person
- It contains
- Id, as integer, not null, auto incremet and primary key.
- Name, as varchar, lenght 45, not null.
- LastName, as varchar, lenght 45, not null.
- Sex, as char, lenght 1, not null.
- It contains
- Student
- It contains
- Id, as integer, not null, and primary key.
- Career, as varchar, lenght 45, not null.
- It contains
There is a foreign key for the Id of Student, it depends on Id of Person.
I've defined a transient property for person, SexNamed. While Sex can be 'M' (Male) of 'F' (Female), SexNamed identifies if Sex is 'M' or 'F' and returns Male or Female accordingly. SexNamed is not in the database (neither I want it to be there).
When I try to use this transient property on anonymous type declaration in a from clause of C#, it gives an exception.
I've prepared a test solution for a better understanding of the exception.
http://s000.tinyupload.com/?file_id=75044529052440576873