Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EF and extra properties
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Titre:
EF and extra properties
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01552736
Message ID:
01552736
Vues:
76
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform