-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike James
committed
Jul 6, 2016
1 parent
d1a0eba
commit 9395318
Showing
4 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
Azure/BeerDrinkinService/Controllers/BeerCoverPhotoController.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Web.Http; | ||
using Microsoft.Azure.Mobile.Server.Config; | ||
using System.Threading.Tasks; | ||
using System.Linq; | ||
|
||
namespace BeerDrinkin.Service.Controllers | ||
{ | ||
[MobileAppController] | ||
public class BeerCoverPhotoController : ApiController | ||
{ | ||
// GET api/BeerCoverPhoto | ||
public async Task<string> Get(string beerId) | ||
{ | ||
var context = new Models.BeerDrinkinContext(); | ||
|
||
var beer = context.Beers.FirstOrDefault(x => x.Id == beerId); | ||
return beer.CoverPhoto; | ||
} | ||
} | ||
} |
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
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