Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return descriptions to the interface
Message
 
 
À
23/10/2015 17:27:52
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01626353
Message ID:
01626385
Vues:
44
>Is there a navigation property from your ScgsLink to your SpGroup? If not, there should be. Then you won't need a GroupDescription property in ScgsLink, since you can just use scsgLink.SpGroup.Descrip. Your query also remains simple as:
>
>public override SChannels GetById(object id)
>        {
>            var sChannel = _siriusContext.SChannels.Include("ScsgLink")         
>             .Include("ScsgLink.SpGroup")  
>             .Where(x => x.ChannelId == (Int32)id)
>             .First();
>
>            return sChannel;
>}
Thanks a lot, Rob. I'll try that out later.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform