Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EF and extra properties
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Entity Framework
Title:
EF and extra properties
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01552736
Message ID:
01552736
Views:
77
Hi everybody,

I am creating the classes for my tables by hand - I am working on a utility application which I already wrote in VFP and I am working on ASP.NET MVC version of it.

In one of the queries I use the following

select Table.Col1, Table.Col2, Table.End_Num - Table.Start_Num + 1 as quantity from myTable Table.

I've checked this link
http://stackoverflow.com/questions/6944904/how-should-i-access-a-computed-column-in-entity-framework-code-first

but it is still not clear to me. I don't have this column as computed in my database, but I think it will be nice to have it as a property in the class. The question is - how should I define such property which is not a column in a table but rather some simple computed expression?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform