Skip to content

Instantly share code, notes, and snippets.

@tanaka-takayoshi
Created February 21, 2014 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanaka-takayoshi/9133417 to your computer and use it in GitHub Desktop.
Save tanaka-takayoshi/9133417 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using MetroEShoppingService.Models;
using Microsoft.WindowsAzure.Mobile.Service.Security;
using Microsoft.WindowsAzure.Mobile.Service.Tables;
namespace MetroEShoppingService.Controllers
{
public class UserDevicesController : ApiController
{
private UserDeviceQuery query;
protected override void Initialize(HttpControllerContext controllerContext)
{
base.Initialize(controllerContext);
query = new UserDeviceQuery();
}
// GET api/<controller>
[RequiresAuthorization(AuthorizationLevel.Anonymous)]
public IEnumerable<UserDevice> Get()
{
return query.GetAll();
}
// POST api/<controller>
public void Post([FromBody]string value)
{
}
// PUT api/<controller>/5
public void Put(int id, [FromBody]string value)
{
}
// DELETE api/<controller>/5
public void Delete(int id)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment