Using LINQ select sublist object from object list by objectId and sublist objectId

  • Thread starter Thread starter Matteus_Beus
  • Start date Start date
M

Matteus_Beus

Guest
I have the follow code but I think there is an easier way to do it via LINQ. Could anyone help?

public string GetCssTheme(int applicationId, int themeId) {
ApplicationCss appCss = (ApplicationCss) AppCss.Where(p => p.ApplicationId == applicationId);
ThemeCss themeCss = (ThemeCss) appCss.Themes.Where(a => a.ThemeID == themeId);
return themeCss.Css;
}

Continue reading...
 
Back
Top