I use a table "TLanguage" to record lable results of my site. I have 4 columns in this table: French, English, German and Spanish.
In a MVC application I use this query:
var req = (from TYP in context.TYP_TypeMission
join ML in context.TLanguage on TYP.IDTMultiLanguage equals ML.IDTMultiLanguage
where TYP.IDTFiliale == idFiliale
orderby TYP.LibTypeMission
select new SelectListItem
{
Selected = TYP.IdTypeMission == idTypeMission,
Value = SqlFunctions.StringConvert((double)TYP.IdTypeMission),
Text = ML.French
}).ToList();
How can I change ML.French by ML.English or ML.German in my query according the language of my site?
Is it possible to create an indirection in the query?