This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| background-color: rgb(29,30,40); | |
| } | |
| .item { | |
| background-color: #3f4d72; | |
| color: #7c5c48; | |
| font-size: xx-large; | |
| text-align: center; | |
| font-weight: bold; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| <div class="grid-wrapper"> | |
| <div class="sub-grid-wrapper"> | |
| <div class="item"> | |
| 1 | |
| </div> | |
| <div class="item"> | |
| 2 | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<IActionResult> Index() | |
| { | |
| return View(await _context.Complaint.ToListAsync()); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //It will only match on POST requests | |
| public async Task<IActionResult> Create([Bind("ID,Name,Mail,Company,Complain")]yourComplaint.Models.Complaint complaint) | |
| { | |
| _context.Add(complaint); | |
| await _context.SaveChangesAsync(); | |
| return RedirectToAction("Index"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public Startup(IHostingEnvironment env) | |
| { | |
| var builder = new ConfigurationBuilder() | |
| .SetBasePath(env.ContentRootPath) | |
| .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) | |
| .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); | |
| if (env.IsDevelopment()) | |
| { | |
| builder.AddUserSecrets<Startup>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void Main(string[] args) | |
| { | |
| BuildWebHost(args).Run(); | |
| } | |
| public static IWebHost BuildWebHost(string[] args) => | |
| WebHost.CreateDefaultBuilder(args) | |
| .UseStartup<Startup>() | |
| .Build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void Main(string[] args) | |
| { | |
| var host = new WebHostBuilder() | |
| .UseKestrel() | |
| .UseContentRoot(Directory.GetCurrentDirectory()) | |
| .UseIISIntegration() | |
| .UseStartup<Startup>() | |
| .UseApplicationInsights() | |
| .Build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bin\ | |
| obj\ | |
| yourComplaint.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM microsoft/aspnetcore-build:2.0 AS build-env | |
| WORKDIR /app | |
| # Copy csproj and restore as distinct layers | |
| COPY *.csproj ./ | |
| RUN dotnet restore | |
| # Copy everything else and build | |
| COPY . ./ | |
| #Build database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @model IEnumerable<yourComplaint.Models.Complaint> | |
| <table class="table"> | |
| <thead> | |
| <tr> | |
| <th> | |
| @Html.DisplayNameFor(model => model.Name) | |
| </th> | |
| <th> |