Skip to content

Commit 36acd6b

Browse files
author
breno.dev
committed
Add project files.
1 parent 288ae6b commit 36acd6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+24384
-0
lines changed

SalesWebMvc.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.168
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SalesWebMvc", "SalesWebMvc\SalesWebMvc.csproj", "{FBD52D13-69B8-422E-8504-D83AC249DDCD}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{FBD52D13-69B8-422E-8504-D83AC249DDCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{FBD52D13-69B8-422E-8504-D83AC249DDCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{FBD52D13-69B8-422E-8504-D83AC249DDCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{FBD52D13-69B8-422E-8504-D83AC249DDCD}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {2F59CFDE-5C82-444C-8169-AF308F5AE9BE}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Mvc;
7+
using SalesWebMvc.Models;
8+
9+
namespace SalesWebMvc.Controllers
10+
{
11+
public class HomeController : Controller
12+
{
13+
public IActionResult Index()
14+
{
15+
return View();
16+
}
17+
18+
public IActionResult About()
19+
{
20+
ViewData["Message"] = "Your application description page.";
21+
22+
return View();
23+
}
24+
25+
public IActionResult Contact()
26+
{
27+
ViewData["Message"] = "Your contact page.";
28+
29+
return View();
30+
}
31+
32+
public IActionResult Privacy()
33+
{
34+
return View();
35+
}
36+
37+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
38+
public IActionResult Error()
39+
{
40+
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
41+
}
42+
}
43+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
3+
namespace SalesWebMvc.Models
4+
{
5+
public class ErrorViewModel
6+
{
7+
public string RequestId { get; set; }
8+
9+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10+
}
11+
}

SalesWebMvc/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;
7+
using Microsoft.AspNetCore.Hosting;
8+
using Microsoft.Extensions.Configuration;
9+
using Microsoft.Extensions.Logging;
10+
11+
namespace SalesWebMvc
12+
{
13+
public class Program
14+
{
15+
public static void Main(string[] args)
16+
{
17+
CreateWebHostBuilder(args).Build().Run();
18+
}
19+
20+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21+
WebHost.CreateDefaultBuilder(args)
22+
.UseStartup<Startup>();
23+
}
24+
}
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:57743",
7+
"sslPort": 44307
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"SalesWebMvc": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
22+
"environmentVariables": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
}
25+
}
26+
}
27+
}

SalesWebMvc/SalesWebMvc.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.AspNetCore.App" />
9+
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
10+
</ItemGroup>
11+
12+
</Project>

SalesWebMvc/Startup.cs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Builder;
6+
using Microsoft.AspNetCore.Hosting;
7+
using Microsoft.AspNetCore.Http;
8+
using Microsoft.AspNetCore.HttpsPolicy;
9+
using Microsoft.AspNetCore.Mvc;
10+
using Microsoft.Extensions.Configuration;
11+
using Microsoft.Extensions.DependencyInjection;
12+
13+
namespace SalesWebMvc
14+
{
15+
public class Startup
16+
{
17+
public Startup(IConfiguration configuration)
18+
{
19+
Configuration = configuration;
20+
}
21+
22+
public IConfiguration Configuration { get; }
23+
24+
// This method gets called by the runtime. Use this method to add services to the container.
25+
public void ConfigureServices(IServiceCollection services)
26+
{
27+
services.Configure<CookiePolicyOptions>(options =>
28+
{
29+
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
30+
options.CheckConsentNeeded = context => true;
31+
options.MinimumSameSitePolicy = SameSiteMode.None;
32+
});
33+
34+
35+
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
36+
}
37+
38+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
39+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
40+
{
41+
if (env.IsDevelopment())
42+
{
43+
app.UseDeveloperExceptionPage();
44+
}
45+
else
46+
{
47+
app.UseExceptionHandler("/Home/Error");
48+
app.UseHsts();
49+
}
50+
51+
app.UseHttpsRedirection();
52+
app.UseStaticFiles();
53+
app.UseCookiePolicy();
54+
55+
app.UseMvc(routes =>
56+
{
57+
routes.MapRoute(
58+
name: "default",
59+
template: "{controller=Home}/{action=Index}/{id?}");
60+
});
61+
}
62+
}
63+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@{
2+
ViewData["Title"] = "About";
3+
}
4+
<h2>@ViewData["Title"]</h2>
5+
<h3>@ViewData["Message"]</h3>
6+
7+
<p>Use this area to provide additional information.</p>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@{
2+
ViewData["Title"] = "Contact";
3+
}
4+
<h2>@ViewData["Title"]</h2>
5+
<h3>@ViewData["Message"]</h3>
6+
7+
<address>
8+
One Microsoft Way<br />
9+
Redmond, WA 98052-6399<br />
10+
<abbr title="Phone">P:</abbr>
11+
425.555.0100
12+
</address>
13+
14+
<address>
15+
<strong>Support:</strong> <a href="mailto:[email protected]">Support@example.com</a><br />
16+
<strong>Marketing:</strong> <a href="mailto:[email protected]">Marketing@example.com</a>
17+
</address>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
@{
2+
ViewData["Title"] = "Home Page";
3+
}
4+
5+
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
6+
<ol class="carousel-indicators">
7+
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
8+
<li data-target="#myCarousel" data-slide-to="1"></li>
9+
<li data-target="#myCarousel" data-slide-to="2"></li>
10+
</ol>
11+
<div class="carousel-inner" role="listbox">
12+
<div class="item active">
13+
<img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" />
14+
<div class="carousel-caption" role="option">
15+
<p>
16+
Learn how to build ASP.NET apps that can run anywhere.
17+
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
18+
Learn More
19+
</a>
20+
</p>
21+
</div>
22+
</div>
23+
<div class="item">
24+
<img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" />
25+
<div class="carousel-caption" role="option">
26+
<p>
27+
There are powerful new features in Visual Studio for building modern web apps.
28+
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409">
29+
Learn More
30+
</a>
31+
</p>
32+
</div>
33+
</div>
34+
<div class="item">
35+
<img src="~/images/banner3.svg" alt="Microsoft Azure" class="img-responsive" />
36+
<div class="carousel-caption" role="option">
37+
<p>
38+
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
39+
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409">
40+
Learn More
41+
</a>
42+
</p>
43+
</div>
44+
</div>
45+
</div>
46+
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
47+
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
48+
<span class="sr-only">Previous</span>
49+
</a>
50+
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
51+
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
52+
<span class="sr-only">Next</span>
53+
</a>
54+
</div>
55+
56+
<div class="row">
57+
<div class="col-md-3">
58+
<h2>Application uses</h2>
59+
<ul>
60+
<li>Sample pages using ASP.NET Core MVC</li>
61+
<li>Theming using <a href="https://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
62+
</ul>
63+
</div>
64+
<div class="col-md-3">
65+
<h2>How to</h2>
66+
<ul>
67+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li>
68+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
69+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
70+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
71+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
72+
</ul>
73+
</div>
74+
<div class="col-md-3">
75+
<h2>Overview</h2>
76+
<ul>
77+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
78+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
79+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
80+
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
81+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
82+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li>
83+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li>
84+
</ul>
85+
</div>
86+
<div class="col-md-3">
87+
<h2>Run &amp; Deploy</h2>
88+
<ul>
89+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
90+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
91+
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
92+
</ul>
93+
</div>
94+
</div>

0 commit comments

Comments
 (0)