Created
September 25, 2009 15:28
-
-
Save alohasoftworks/193621 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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