Skip to content

Instantly share code, notes, and snippets.

@alohasoftworks
Created September 25, 2009 15:28
Show Gist options
  • Select an option

  • Save alohasoftworks/193621 to your computer and use it in GitHub Desktop.

Select an option

Save alohasoftworks/193621 to your computer and use it in GitHub Desktop.
public class JsonJob
{
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public DateTime DateAdded { get; set; }
public DateTime? DateModified { get; set; }
}
var job = (from jobs in db.Jobs
where jobs.Id == jobId
select jobs).First();
var jsonJob = new JsonJob
{
Id = job.Id,
Title = job.Title,
Description = job.Description,
DateAdded = job.DateAdded,
DateModified = job.DateModified
};
return Json(jsonJob);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment