Skip to content

Instantly share code, notes, and snippets.

@ewhitmore
Created January 28, 2014 17:15
Show Gist options
  • Save ewhitmore/8671930 to your computer and use it in GitHub Desktop.
Save ewhitmore/8671930 to your computer and use it in GitHub Desktop.
C# WebAPI - Angularjs $resource decimal hack
[HttpPut]
[Authorize(Roles = "VendorAdmin")]
[Route("{id:int}/SetPrice/{price:decimal}")]
public IHttpActionResult SetPrice(int id, decimal price)
{
//...
try
{
PricingAgreementItemService.SetPrice(id, price);
}
catch (Exception)
{
return NotFound();
}
return Ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment