In my
public ActionResult Active()
{
var list = _entity.CALL_UP.Where(s => s.STATE == ICallUpsState.FULLY_SIGNED)
.Where(f => f.START_DATE <= DateTime.Today
&& f.END_DATE >= DateTime.Today)
.ToList();
return View(list);
}
This returns an IEnumerable<CallUP> with the correct result, but I want USER_ID to be displayed as User Name which is in another table. How do I do that?
For Example:
<%: String.Format("{0:F}", item.CREATED_BY_USER_ID) %> this is an ID
the actual user name is stored in another table, I want to display that user name instead
An idea:
Join the
Userstable in your query result returning a custom object with theselect newconstruct:Something like this:
Take a look at these pages for more info:
http://msdn.microsoft.com/en-us/vcsharp/ee908647.aspx#crossjoin
C# Join Example (LINQ)