lundi 25 décembre 2017

write IQueryable in reflection

I'm newbie in C# refelection. Please help me to write the following code using relfection

var slItem = db.m_area
            .Where(s => s.tenant_id.Equals(sessionId))
            .Select(s => new SelectListItem
                                {
                                    Text = s.area_id,
                                    Value = s.area_name
                                }).ToList();

tenant_id, area_id, area_name, m_area, sessionId are parameters of reflection function.

Thanks in advance.





Aucun commentaire:

Enregistrer un commentaire