Hello,
I try to convert an anonymous type to class but I don't.
My code in ViewModel :
<public List**<???>** PoolCondition { get; set; }
Entities db = new Entities();
public SelectListViewModel()
{
string Lang = SessionManager.Language;
var poolcondition = (from ddlv in db.DropDownListValue
from ddlv_t in ddlv.DropDownListValue_Translation
where ddlv_t.Language.code == Lang
select new { ddlv.Id, ddlv_t.Traduction }).ToList();
PoolCondition = poolcondition;
I've an error width PoolCondition=poolcondition, because poolcondition is anonymous type. How to cast my List PoolCondition??
Thank you!