- Damian Edward's Minimal Playground: https://github.com/DamianEdwards/MinimalApiPlayground
- Contoso Construction API with Azure Deployment Scripts: https://github.com/bradygaster/Contoso.Construction
- .NET Conf 2021 Demo App: https://github.com/halter73/Contoso.Construction
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This file contains 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
import { createStyles, Paper, Table, TableBody, TableContainer, TablePagination, Theme } from '@material-ui/core'; | |
import { makeStyles, TableCell, TableHead, TableRow, TableSortLabel } from '@material-ui/core'; | |
import React from 'react'; | |
interface IDataTableColumn { | |
id: string | |
name: string, | |
enableSort?: boolean, | |
align?: "center" | "inherit" | "justify" | "left" | "right" | |
} |
This file contains 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
#!/usr/bin/env dotnet run | |
var builder = WebApplication.CreateBuilder(args); | |
var config = builder.Configuration; | |
var connString = config["connectionString"] ?? "Data Source=todos.db"; | |
builder.AddDbContext<TodoDb>(options => options.UseSqlite(connString)); | |
builder.AddSqlite<Todo>(connString) // Higher level API perhaps? | |
var app = builder.Build(); |
This file contains 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
import * as React from 'react' | |
// routing, etc. | |
import { Reset } from '~/ui/shared/Reset' | |
export class App extends React.Component { | |
public render() { | |
return ( | |
<div> | |
<title>Dashboard</title> |
This file contains 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
# ASP.NET Core | |
# Build and test ASP.NET Core projects targeting .NET Core. | |
# Add steps that run tests, create a NuGet package, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
pool: | |
vmImage: 'Ubuntu 16.04' | |
variables: | |
buildConfiguration: 'Release' |
bonus tip: for more darkness > https://darkreader.org/
This file contains 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
<!-- How to insert a date editor in a Razor view --> | |
<div class="form-group"> | |
@Html.LabelFor(model => model.Start, htmlAttributes: new { @class = "control-label col-md-2" }) | |
<div class="col-md-10"> | |
@Html.TextBoxFor(model => model.Start, new { @type="date", @class = "form-control datepicker", @Value = Model.Start.ToString("yyyy-MM-dd") } ) | |
@Html.ValidationMessageFor(model => model.Start, "", new { @class = "text-danger" }) | |
</div> | |
</div> |
If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:
echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes
I suggest you edit your /etc/rc.local
file to make this change persistant across reboots.
sudo nano /etc/rc.local
NewerOlder