Skip to content

Commit

Permalink
Scaffold default Web basic project
Browse files Browse the repository at this point in the history
EnumSelectTagHelper sample
  • Loading branch information
peterblazejewicz committed Oct 17, 2015
1 parent 12a8bb2 commit 5f701ea
Show file tree
Hide file tree
Showing 26 changed files with 759 additions and 0 deletions.
3 changes: 3 additions & 0 deletions EnumsSelectTagHelper/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "wwwroot/lib"
}
206 changes: 206 additions & 0 deletions EnumsSelectTagHelper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
## 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

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

# Visual Studio 2015 cache/options directory
.vs/

# 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

# DNX
project.lock.json
artifacts/

*_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 add-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/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

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

# 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
35 changes: 35 additions & 0 deletions EnumsSelectTagHelper/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;

namespace EnumsSelectTagHelper.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}

public IActionResult About()
{
ViewData["Message"] = "Your application description page.";

return View();
}

public IActionResult Contact()
{
ViewData["Message"] = "Your contact page.";

return View();
}

public IActionResult Error()
{
return View("~/Views/Shared/Error.cshtml");
}
}
}
10 changes: 10 additions & 0 deletions EnumsSelectTagHelper/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM microsoft/aspnet:1.0.0-beta8

COPY project.json /app/
WORKDIR /app
RUN ["dnu", "restore"]
COPY . /app


EXPOSE 5000
ENTRYPOINT ["dnx", "-p", "project.json", "web"]
42 changes: 42 additions & 0 deletions EnumsSelectTagHelper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Welcome to ASP.NET 5 Preview

We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new.

ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854).
Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks).

We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015.
The ASP.NET Team

### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016)

### This application consists of:
* Sample pages using ASP.NET MVC 6
* [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources
* Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939)

#### NEW CONCEPTS
* [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008)
* [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012)
* [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013)
* [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014)
* [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849)
* [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850)

#### CUSTOMIZE APP
* [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600)
* [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602)
* [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603)
* [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606)
* [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604)
* [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009)
* [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848)

#### DEPLOY
* [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851)
* [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852)
* [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853)
* [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609)
* [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019)

We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015)
78 changes: 78 additions & 0 deletions EnumsSelectTagHelper/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.Dnx.Runtime;
using Microsoft.Framework.Configuration;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Logging;

namespace EnumsSelectTagHelper
{
public class Startup
{
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)
{
// Setup configuration sources.
var builder = new ConfigurationBuilder()
.SetBasePath(appEnv.ApplicationBasePath)
.AddJsonFile("appsettings.json")
.AddEnvironmentVariables();
Configuration = builder.Build();
}

public IConfigurationRoot Configuration { get; set; }

// This method gets called by the runtime.
public void ConfigureServices(IServiceCollection services)
{
// Add MVC services to the services container.
services.AddMvc();

// Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers.
// You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json.
// services.AddWebApiConventions();
}

// Configure is called after ConfigureServices is called.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.MinimumLevel = LogLevel.Information;
loggerFactory.AddConsole();
loggerFactory.AddDebug();

// Configure the HTTP request pipeline.

// Add the platform handler to the request pipeline.
app.UseIISPlatformHandler();

// Add the following to the request pipeline only in development environment.
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
// Add Error handling middleware which catches all application specific errors and
// send the request to the following path or controller action.
app.UseExceptionHandler("/Home/Error");
}

// Add static files to the request pipeline.
app.UseStaticFiles();

// Add MVC to the request pipeline.
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");

// Uncomment the following line to add a route for porting Web API 2 controllers.
// routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}");
});
}
}
}
7 changes: 7 additions & 0 deletions EnumsSelectTagHelper/Views/Home/About.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@{
ViewData["Title"] = "About";
}
<h2>@ViewData["Title"].</h2>
<h3>@ViewData["Message"]</h3>

<p>Use this area to provide additional information.</p>
Loading

0 comments on commit 5f701ea

Please sign in to comment.