Skip to content

Commit a13ad19

Browse files
committed
Initial
1 parent f0948f6 commit a13ad19

File tree

10 files changed

+405
-0
lines changed

10 files changed

+405
-0
lines changed

AspNetVNextWebApiApp.sln

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.23107.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AE2ABAE1-7DA8-4676-B2B9-916E74B63526}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DD484CA4-7A02-4D10-9726-DDAF52440B5C}"
9+
ProjectSection(SolutionItems) = preProject
10+
global.json = global.json
11+
EndProjectSection
12+
EndProject
13+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNetVNextWebApiApp", "src\AspNetVNextWebApiApp\AspNetVNextWebApiApp.xproj", "{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5}"
14+
EndProject
15+
Global
16+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
17+
Debug|Any CPU = Debug|Any CPU
18+
Release|Any CPU = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5}.Release|Any CPU.Build.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(SolutionProperties) = preSolution
27+
HideSolutionNode = FALSE
28+
EndGlobalSection
29+
GlobalSection(NestedProjects) = preSolution
30+
{BC7EC824-29D1-4DF0-8201-DA6F96FF31F5} = {AE2ABAE1-7DA8-4676-B2B9-916E74B63526}
31+
EndGlobalSection
32+
EndGlobal

global.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-beta6",
5+
"runtime": "clr",
6+
"architecture": "x86"
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>bc7ec824-29d1-4df0-8201-da6f96ff31f5</ProjectGuid>
10+
<RootNamespace>AspNetVNextWebApiApp</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup>
15+
<SchemaVersion>2.0</SchemaVersion>
16+
<DevelopmentServerPort>53131</DevelopmentServerPort>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNet.Mvc;
6+
7+
namespace AspNetVNextWebApiApp.Controllers
8+
{
9+
[Route("api/[controller]")]
10+
public class ValuesController : Controller
11+
{
12+
// GET: api/values
13+
[HttpGet]
14+
public IEnumerable<string> Get()
15+
{
16+
return new string[] { "value1", "value2" };
17+
}
18+
19+
// GET api/values/5
20+
[HttpGet("{id}")]
21+
public string Get(int id)
22+
{
23+
return "value";
24+
}
25+
26+
// POST api/values
27+
[HttpPost]
28+
public void Post([FromBody]string value)
29+
{
30+
}
31+
32+
// PUT api/values/5
33+
[HttpPut("{id}")]
34+
public void Put(int id, [FromBody]string value)
35+
{
36+
}
37+
38+
// DELETE api/values/5
39+
[HttpDelete("{id}")]
40+
public void Delete(int id)
41+
{
42+
}
43+
}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Welcome to ASP.NET 5</title>
6+
<style>
7+
html {
8+
background: #f1f1f1;
9+
height: 100%;
10+
}
11+
12+
body {
13+
background: #fff;
14+
color: #505050;
15+
font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif;
16+
margin: 1%;
17+
min-height: 95.5%;
18+
border: 1px solid silver;
19+
position: relative;
20+
}
21+
22+
#header {
23+
padding: 0;
24+
}
25+
26+
#header h1 {
27+
font-size: 44px;
28+
font-weight: normal;
29+
margin: 0;
30+
padding: 10px 30px 10px 30px;
31+
}
32+
33+
#header span {
34+
margin: 0;
35+
padding: 0 30px;
36+
display: block;
37+
}
38+
39+
#header p {
40+
font-size: 20px;
41+
color: #fff;
42+
background: #007acc;
43+
padding: 0 30px;
44+
line-height: 50px;
45+
margin-top: 25px;
46+
47+
}
48+
49+
#header p a {
50+
color: #fff;
51+
text-decoration: underline;
52+
font-weight: bold;
53+
padding-right: 35px;
54+
background: no-repeat right bottom url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAWCAMAAAAcqPc3AAAANlBMVEUAAAAAeswfitI9mthXp91us+KCvuaTx+mjz+2x1u+83PLH4vTR5/ba7Pjj8Pns9fv1+v3////wy3dWAAAAAXRSTlMAQObYZgAAAHxJREFUeNp9kVcSwCAIRMHUYoH7XzaxOxJ9P8oyQ1uIqNPwh3s2aLmIM2YtqrLcQIeQEylhuCeUOlhgve5yoBCfWmlnlgkN4H8ykbpaE7gR03AbUHiwoOxUH9Xp+ubd41p1HF3mBPrfC87BHeTdaB3ceeKL9HGpcvX9zu6+DdMWT9KQPvYAAAAASUVORK5CYII=);
55+
}
56+
57+
#main {
58+
padding: 5px 30px;
59+
clear: both;
60+
}
61+
62+
.section {
63+
width: 21.7%;
64+
float: left;
65+
margin: 0 0 0 4%;
66+
}
67+
68+
.section h2 {
69+
font-size: 13px;
70+
text-transform: uppercase;
71+
margin: 0;
72+
border-bottom: 1px solid silver;
73+
padding-bottom: 12px;
74+
margin-bottom: 8px;
75+
}
76+
77+
.section.first {
78+
margin-left: 0;
79+
}
80+
81+
.section.first h2 {
82+
font-size: 24px;
83+
text-transform: none;
84+
margin-bottom: 25px;
85+
border: none;
86+
}
87+
88+
.section.first li {
89+
border-top: 1px solid silver;
90+
padding: 8px 0;
91+
}
92+
93+
.section.last {
94+
margin-right: 0;
95+
}
96+
97+
ul {
98+
list-style: none;
99+
padding: 0;
100+
margin: 0;
101+
line-height: 20px;
102+
}
103+
104+
li {
105+
padding: 4px 0;
106+
}
107+
108+
a {
109+
color: #267cb2;
110+
text-decoration: none;
111+
}
112+
113+
a:hover {
114+
text-decoration: underline;
115+
}
116+
117+
#footer {
118+
clear: both;
119+
padding-top: 50px;
120+
}
121+
122+
#footer p {
123+
position: absolute;
124+
bottom: 10px;
125+
}
126+
</style>
127+
</head>
128+
<body>
129+
130+
<div id="header">
131+
<h1>Welcome to ASP.NET 5 Preview</h1>
132+
<span>
133+
We've made some big updates in this release, so it’s <b>important</b> that you spend
134+
a few minutes to learn what’s new.
135+
<br /><br />
136+
ASP.NET 5 has been rearchitected to make it <b>lean</b> and <b>composable</b>. It's fully
137+
<b>open source</b> and available on <a href="http://go.microsoft.com/fwlink/?LinkID=517854">GitHub</a>.
138+
<br />
139+
Your new project automatically takes advantage of modern client-side utilities
140+
like <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518005">npm</a>
141+
(to add client-side libraries) and <a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> (for client-side build and automation tasks).
142+
143+
<br /><br />
144+
We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015.
145+
<br />
146+
The ASP.NET Team
147+
</span>
148+
<p>You've created a new ASP.NET 5 project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p>
149+
</div>
150+
151+
<div id="main">
152+
<div class="section first">
153+
<h2>This application consists of:</h2>
154+
<ul>
155+
<li>Sample pages using ASP.NET MVC 6</li>
156+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side resources</li>
157+
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
158+
</ul>
159+
</div>
160+
161+
<div class="section">
162+
<h2>New concepts</h2>
163+
<ul>
164+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">The 'wwwroot' explained</a></li>
165+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518012">Configuration in ASP.NET 5</a></li>
166+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518013">Dependency Injection</a></li>
167+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518014">Razor TagHelpers</a></li>
168+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517849">Manage client packages using Gulp</a></li>
169+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517850">Develop on different platforms</a></li>
170+
</ul>
171+
</div>
172+
173+
<div class="section">
174+
<h2>Customize app</h2>
175+
<ul>
176+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add Controllers and Views</a></li>
177+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398602">Add Data using EntityFramework</a></li>
178+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398603">Add Authentication using Identity</a></li>
179+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398606">Add real time support using SignalR</a></li>
180+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398604">Add Class library</a></li>
181+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518009">Add Web APIs with MVC 6</a></li>
182+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517848">Add client packages using Bower</a></li>
183+
</ul>
184+
</div>
185+
186+
<div class="section last">
187+
<h2>Deploy</h2>
188+
<ul>
189+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app locally</a></li>
190+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517852">Run your app on ASP.NET Core 5</a></li>
191+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run commands in your project.json</a></li>
192+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Sites</a></li>
193+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518019">Publish to the file system</a></li>
194+
</ul>
195+
</div>
196+
197+
<div id="footer">
198+
<p>We would love to hear your <a href="http://go.microsoft.com/fwlink/?LinkId=518015">feedback</a></p>
199+
</div>
200+
</div>
201+
202+
</body>
203+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"profiles": {
3+
"IIS Express": {
4+
"commandName" : "IISExpress",
5+
"launchBrowser": true,
6+
"launchUrl": "api/values",
7+
"environmentVariables" : {
8+
"ASPNET_ENV": "Development"
9+
}
10+
}
11+
}
12+
}

src/AspNetVNextWebApiApp/Startup.cs

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNet.Builder;
6+
using Microsoft.AspNet.Hosting;
7+
using Microsoft.AspNet.Http;
8+
using Microsoft.AspNet.Routing;
9+
using Microsoft.Framework.DependencyInjection;
10+
11+
namespace AspNetVNextWebApiApp
12+
{
13+
public class Startup
14+
{
15+
public Startup(IHostingEnvironment env)
16+
{
17+
}
18+
19+
// This method gets called by a runtime.
20+
// Use this method to add services to the container
21+
public void ConfigureServices(IServiceCollection services)
22+
{
23+
services.AddMvc();
24+
// Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers.
25+
// You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json.
26+
// services.AddWebApiConventions();
27+
}
28+
29+
// Configure is called after ConfigureServices is called.
30+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
31+
{
32+
// Configure the HTTP request pipeline.
33+
app.UseStaticFiles();
34+
35+
// Add MVC to the request pipeline.
36+
app.UseMvc();
37+
// Add the following route for porting Web API 2 controllers.
38+
// routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}");
39+
}
40+
}
41+
}

src/AspNetVNextWebApiApp/hosting.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server=Microsoft.AspNet.Server.WebListener
2+
server.urls=http://localhost:5000

0 commit comments

Comments
 (0)