Skip to content

Instantly share code, notes, and snippets.

@damienwebdev
Created May 21, 2016 16:14
Show Gist options
  • Save damienwebdev/e07ae84d1d00e9d063c3ba975d16a3f1 to your computer and use it in GitHub Desktop.
Save damienwebdev/e07ae84d1d00e9d063c3ba975d16a3f1 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Description;
using DoThisAPI.Models;
using System.Web.Mvc;
namespace DoThisAPI.Controllers
{
public class TaskController
{
public ActionResult Movies()
{
var movies = new List<object>();
movies.Add(new { Title = "Ghostbusters", Genre = "Comedy", Year = 1984 });
movies.Add(new { Title = "Gone with Wind", Genre = "Drama", Year = 1939 });
movies.Add(new { Title = "Star Wars", Genre = "Science Fiction", Year = 1977 });
return Json(movies, JsonRequestBehavior.AllowGet);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment