RoadMap
C# 6.0 -> C# 9.0 new features
- MVC
- Razor Pages
- Web API
using System; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace Portal.Infrastructure.Extentions | |
{ | |
public static class StringExtentions | |
{ | |
private const int ZeroCharCode = '0'; | |
private const int LocalizedZeroCharCode = '۰'; |
.class public auto ansi beforefieldinit MyApp.IndexModel | |
extends [Microsoft.AspNetCore.Mvc.RazorPages]Microsoft.AspNetCore.Mvc.RazorPages.PageModel | |
{ | |
// Nested Types | |
.class nested private auto ansi sealed beforefieldinit '<OnGet>d__0' | |
extends [System.Runtime]System.Object | |
implements [System.Runtime]System.Runtime.CompilerServices.IAsyncStateMachine | |
{ | |
.custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( | |
01 00 00 00 |
using System; | |
using static Domain.Result; | |
namespace Domain | |
{ | |
public readonly struct Result | |
{ | |
private readonly Result<int, StringError> _result => new Result<int, StringError>(0); | |
public int Value => _result.Value; |
using Microsoft.AspNetCore.Mvc; | |
using MyProfile.Common; | |
using PeopleApp.Common; | |
using PeopleApp.Data; | |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace PeopleApp.Controllers | |
{ |
import turtle | |
t=turtle.getturtle() | |
t.speed(100) | |
t.fillcolor("yellow") | |
t.begin_fill() | |
t.pensize(5) | |
t.pencolor("black") |
"Watch": { | |
"commandName": "Executable", | |
"executablePath": "dotnet.exe", | |
"workingDirectory": "$(ProjectDir)", | |
"commandLineArgs": "watch run", | |
"launchBrowser": true, | |
"launchUrl": "https://localhost:5001;http://localhost:5000", | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" |
"Tye": { | |
"commandName": "Executable", | |
"executablePath": "tye", | |
"commandLineArgs": "run", | |
"workingDirectory": "$(SolutionDir)", | |
"launchBrowser": true, | |
"launchUrl": "https://localhost:5001;http://localhost:5000", | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" |
[ | |
"That code seemed so simple I didn't think it needed testing", | |
"That isn't covered by my job description", | |
"I can't test everything", | |
"That's not a bug it's a configuration issue", | |
"That wasn't in the original specification", | |
"It's just some unlucky coincidence", | |
"Oh, you said you DIDN'T want that to happen?", | |
"There were too many developers working on that same thing", | |
"I have too many other high priority things to do right now", |
[Route("api/user/roles")] | |
public IActionResult UserRoles() | |
{ | |
var q1 = from userRole in _shopDbContext.UserRoles | |
join role in _shopDbContext.Roles on userRole.RoleId equals role.Id | |
join user in _shopDbContext.Users on userRole.UserId equals user.Id | |
select new | |
{ | |
user.Id, | |
user.FirstName, |