you can select first name of user by using linq.
Create a new ViewModel class like this
public class CourseViewModel
{
public int CourseId { get; set; }
public string CourseName { get; set; }
public string CourseDesc { get; set; }
public string Status { get; set; }
public int CreatedBy { get; set; }
public DateTime CreatedOn { get; set; }
public string FirstName { get; set; }
}
And in Controller pass this list to view,which is strongly binded to IEnumerable<courseviewmodel>,so that in view @item.FirstName display name of user.
var listOfModel = from course in courses
let firstOrDefault = users.FirstOrDefault(x => x.Id == course.CreatedBy)
where firstOrDefault != null
select new CourseViewModel()
{
CourseId = course.CourseId,
CourseName = course.CourseName,
CourseDesc = course.CourseDesc,
Status = course.Status,
CreatedBy = course.CreatedBy,
CreatedOn = course.CreatedOn,
FirstName = firstOrDefault.FirstName
};