Created
February 21, 2014 12:28
-
-
Save tanaka-takayoshi/9133417 to your computer and use it in GitHub Desktop.
This file contains 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
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