Skip to content

Commit

Permalink
Adding CoverPhoto Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike James committed Jul 6, 2016
1 parent d1a0eba commit 9395318
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 21 deletions.
27 changes: 14 additions & 13 deletions Azure/BeerDrinkinService/BeerDrinkin.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,36 +140,36 @@
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Authentication.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.Authentication.dll</HintPath>
<Reference Include="Microsoft.Azure.Mobile.Server.Authentication, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Authentication.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Authentication.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.CrossDomain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.CrossDomain.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.CrossDomain.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Entity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Entity.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.Entity.dll</HintPath>
<Reference Include="Microsoft.Azure.Mobile.Server.Entity, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Entity.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Entity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Home">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Home.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Home.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Notifications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Notifications.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.Notifications.dll</HintPath>
<Reference Include="Microsoft.Azure.Mobile.Server.Notifications, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Notifications.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Notifications.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Quickstart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Quickstart.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.Quickstart.dll</HintPath>
<Reference Include="Microsoft.Azure.Mobile.Server.Quickstart, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Quickstart.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Quickstart.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Swagger, Version=0.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Swagger.0.3.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Swagger.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Mobile.Server.Tables, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Mobile.Server.Tables.1.0.119.0\lib\net45\Microsoft.Azure.Mobile.Server.Tables.dll</HintPath>
<Reference Include="Microsoft.Azure.Mobile.Server.Tables, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Server.Tables.1.1.157.1\lib\net45\Microsoft.Azure.Mobile.Server.Tables.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.NotificationHubs, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -205,7 +205,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Rest.ClientRuntime.1.8.1\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -248,8 +248,8 @@
<HintPath>..\packages\Mindscape.Raygun4Net.5.3.0\lib\net40\Mindscape.Raygun4Net4.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\WeatherNet.2.1\lib\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
Expand Down Expand Up @@ -385,6 +385,7 @@
<Compile Include="Controllers\AppEventController.cs" />
<Compile Include="Controllers\BarcodeController.cs" />
<Compile Include="Controllers\BeerController.cs" />
<Compile Include="Controllers\BeerCoverPhotoController.cs" />
<Compile Include="Controllers\CheckInController.cs" />
<Compile Include="Controllers\PictureController.cs" />
<Compile Include="Controllers\RatingController.cs" />
Expand Down
20 changes: 20 additions & 0 deletions Azure/BeerDrinkinService/Controllers/BeerCoverPhotoController.cs
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;
}
}
}
2 changes: 1 addition & 1 deletion Azure/BeerDrinkinService/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
Expand Down
14 changes: 7 additions & 7 deletions Azure/BeerDrinkinService/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Authentication" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Authentication" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.CrossDomain" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Entity" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Entity" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Home" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Notifications" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Quickstart" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Notifications" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Quickstart" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Swagger" version="0.3.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Tables" version="1.0.119.0" targetFramework="net45" />
<package id="Microsoft.Azure.Mobile.Server.Tables" version="1.1.157.1" targetFramework="net45" />
<package id="Microsoft.Azure.NotificationHubs" version="1.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Search" version="1.1.2" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
Expand All @@ -49,13 +49,13 @@
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime" version="1.8.1" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="2.5.2" targetFramework="net45" />
<package id="Microsoft.Spatial" version="6.15.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net45" />
<package id="Mindscape.Raygun4Net" version="5.3.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="RateBeer" version="1.0.0" targetFramework="net45" />
<package id="Swashbuckle.Core" version="5.2.2" targetFramework="net45" />
Expand Down

0 comments on commit 9395318

Please sign in to comment.