Skip to content

Commit

Permalink
Fixing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike James committed Jun 12, 2016
1 parent 41cc7f0 commit ed488b3
Show file tree
Hide file tree
Showing 823 changed files with 87,534 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .deployment
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[config]
project = Azure/MobileService/MobileService.csproj
202 changes: 202 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Packages
[Pp]ackages/

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studo 2015 cache/options directory
.vs/

#Components
[C]omponents/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt
3 changes: 3 additions & 0 deletions Azure/BeerDrinkin.Web/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "wwwroot/lib"
}
24 changes: 24 additions & 0 deletions Azure/BeerDrinkin.Web/BeerDrinkin.Web.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>b9272124-f3b6-4b35-a2a1-94aff650cbd5</ProjectGuid>
<RootNamespace>BeerDrinkin.Web</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<ApplicationInsightsResourceId>/subscriptions/62083f52-d1ec-42da-8d71-808c210cc109/resourcegroups/Default-ApplicationInsights-CentralUS/providers/microsoft.insights/components/BeerDrinkin.Web</ApplicationInsightsResourceId>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
<DnxInvisibleContent Include="package.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
121 changes: 121 additions & 0 deletions Azure/BeerDrinkin.Web/Controllers/BeerController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
using System.Linq;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using BeerDrinkin.DataObjects;
using BeerDrinkin.Web.Models;

namespace BeerDrinkin.Web.Controllers
{
public class BeerController : Controller
{
private ApplicationDbContext _context;

public BeerController(ApplicationDbContext context)
{
_context = context;
}

// GET: Beer
public IActionResult Index()
{
return View(_context.BeerItems.ToList());
}

// GET: Beer/Details/5
public IActionResult Details(string id)
{
if (id == null)
{
return HttpNotFound();
}

Beer beerItem = _context.BeerItems.Single(m => m.Id == id);
if (beerItem == null)
{
return HttpNotFound();
}

return View(beerItem);
}

// GET: Beer/Create
public IActionResult Create()
{
return View();
}

// POST: Beer/Create
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Create(Beer beerItem)
{
if (ModelState.IsValid)
{
_context.BeerItems.Add(beerItem);
_context.SaveChanges();
return RedirectToAction("Index");
}
return View(beerItem);
}

// GET: Beer/Edit/5
public IActionResult Edit(string id)
{
if (id == null)
{
return HttpNotFound();
}

Beer beerItem = _context.BeerItems.Single(m => m.Id == id);
if (beerItem == null)
{
return HttpNotFound();
}
return View(beerItem);
}

// POST: Beer/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Edit(Beer beerItem)
{
if (ModelState.IsValid)
{
_context.Update(beerItem);
_context.SaveChanges();
return RedirectToAction("Index");
}
return View(beerItem);
}

// GET: Beer/Delete/5
[ActionName("Delete")]
public IActionResult Delete(string id)
{
if (id == null)
{
return HttpNotFound();
}

Beer beerItem = _context.BeerItems.Single(m => m.Id == id);
if (beerItem == null)
{
return HttpNotFound();
}

return View(beerItem);
}

// POST: Beer/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(string id)
{
Beer beerItem = _context.BeerItems.Single(m => m.Id == id);
_context.BeerItems.Remove(beerItem);
_context.SaveChanges();
return RedirectToAction("Index");
}
}
}
Loading

0 comments on commit ed488b3

Please sign in to comment.