Skip to content

Commit 4b22dc7

Browse files
committed
First commit
1 parent f148ec4 commit 4b22dc7

31 files changed

+1433
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
8+
9+
namespace MiniRest.NetCore.Api.Controllers
10+
{
11+
[Route("api/[controller]")]
12+
public class ValuesController : Controller
13+
{
14+
// GET: api/values
15+
[HttpGet]
16+
public IEnumerable<string> Get()
17+
{
18+
return new string[] { "value1", "value2" };
19+
}
20+
21+
// GET api/values/5
22+
[HttpGet("{id}")]
23+
public string Get(int id)
24+
{
25+
return "value";
26+
}
27+
28+
// POST api/values
29+
[HttpPost]
30+
public void Post([FromBody]string value)
31+
{
32+
}
33+
34+
// PUT api/values/5
35+
[HttpPut("{id}")]
36+
public void Put(int id, [FromBody]string value)
37+
{
38+
}
39+
40+
// DELETE api/values/5
41+
[HttpDelete("{id}")]
42+
public void Delete(int id)
43+
{
44+
}
45+
}
46+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
8+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
9+
<PropertyGroup Label="Globals">
10+
<ProjectGuid>6bb57afd-a433-4976-b879-14657694d763</ProjectGuid>
11+
<RootNamespace>MiniRest.NetCore.Api</RootNamespace>
12+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
13+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<SchemaVersion>2.0</SchemaVersion>
19+
</PropertyGroup>
20+
<ItemGroup>
21+
<DnxInvisibleContent Include="bower.json" />
22+
<DnxInvisibleContent Include=".bowerrc" />
23+
</ItemGroup>
24+
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
25+
</Project>

MiniRest.NetCore.Api/Program.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Hosting;
7+
8+
namespace MiniRest.NetCore.Api
9+
{
10+
public class Program
11+
{
12+
public static void Main(string[] args)
13+
{
14+
var host = new WebHostBuilder()
15+
.UseKestrel()
16+
.UseContentRoot(Directory.GetCurrentDirectory())
17+
.UseIISIntegration()
18+
.UseStartup<Startup>()
19+
.Build();
20+
21+
host.Run();
22+
}
23+
}
24+
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Welcome to ASP.NET Core</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 Core</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+
</span>
136+
<p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p>
137+
</div>
138+
139+
<div id="main">
140+
<div class="section first">
141+
<h2>This application consists of:</h2>
142+
<ul>
143+
<li>Sample pages using ASP.NET Core MVC</li>
144+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
145+
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
146+
</ul>
147+
</div>
148+
<div class="section">
149+
<h2>How to</h2>
150+
<ul>
151+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li>
152+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li>
153+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
154+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
155+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
156+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
157+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
158+
</ul>
159+
</div>
160+
<div class="section">
161+
<h2>Overview</h2>
162+
<ul>
163+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
164+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
165+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
166+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
167+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
168+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li>
169+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li>
170+
</ul>
171+
</div>
172+
<div class="section last">
173+
<h2>Run & Deploy</h2>
174+
<ul>
175+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
176+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
177+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
178+
</ul>
179+
</div>
180+
181+
<div id="footer">
182+
<p>We would love to hear your <a href="http://go.microsoft.com/fwlink/?LinkId=518015">feedback</a></p>
183+
</div>
184+
</div>
185+
186+
</body>
187+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:63180/",
7+
"sslPort": 0
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"MiniRest.NetCore.Api": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"launchUrl": "http://localhost:5000",
22+
"environmentVariables": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
}
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)