Pulling through data in linked tables

I have an events table (UserSchedule) and a jobs table (Job).

UserSchedule has a JobId and in the jobs table the job has a title (Job.Name). I want to use this as the event title on the scheduler.

I don’t want to have to store the job title in my events table like I was doing early, I just want to pull it through with the join.

If I store it in the event table I can access it but can I join table?

I also want to use the same technique to pull over different table data…

Currently I set the Event Title like this…

scheduler.Templates.event_text = "Project: {JobTitle}";

Hello,
in this case you’ll need to define a client-side template (i.e. in JavaScript). You have to load list of jobs to the page (you can use a custom ajax request for this), and inside a template you select the appropriate title from a list of jobs
scheduler-net.com/docs/templatet … event_text

I don’t want to write JavaScript though I want to be able to do it via C# MVC. Can I not load these items in ContentResult Data() using Linq to SQL?

Just to explain my use-case… I have people and projects and I want to create recurring events for people which act as timesheets against projects… however projects have custom fields that need to be pulled into the lightbox.

What is my best approach?

For example if I do this, I can access Job Name with Linq - how do I then assign this in the view - like this for example in my public ActionResult Index()…

scheduler.Templates.event_text = "Project: {Job,Name}";

I have UserSchedules table that contains events and Job table that contains projects.

[code]public ContentResult Data()
{
int userId = Convert.ToInt32(Request.QueryString[“userid”]);

        var events = from e in _context.UserSchedules
        join jobs in _context.Jobs
        on e.JobId equals jobs.Id
        where e.UserId == userId
        select e;

    var jobtitle = events.Select(x => x.Job.Name).ToString();
    return (new SchedulerAjaxData(events));
}[/code]

Can I do something like