Skip to content

Instantly share code, notes, and snippets.

View conectado's full-sized avatar

Gabi conectado

View GitHub Profile
body {
background-color: rgb(29,30,40);
}
.item {
background-color: #3f4d72;
color: #7c5c48;
font-size: xx-large;
text-align: center;
font-weight: bold;
<body>
<div class="grid-wrapper">
<div class="sub-grid-wrapper">
<div class="item">
1
</div>
<div class="item">
2
</div>
</div>
public async Task<IActionResult> Index()
{
return View(await _context.Complaint.ToListAsync());
}
//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");
}
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>();
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
bin\
obj\
yourComplaint.db
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
@model IEnumerable<yourComplaint.Models.Complaint>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>