Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return descriptions to the interface
Message
 
 
To
23/10/2015 17:27:52
General information
Forum:
ASP.NET
Category:
Entity Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01626353
Message ID:
01626385
Views:
45
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform