RoadMap
C# 6.0 -> C# 9.0 new features
- MVC
- Razor Pages
- Web API
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 | |
{ |
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; |
.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 System.Linq; | |
using System.Text.RegularExpressions; | |
namespace Portal.Infrastructure.Extentions | |
{ | |
public static class StringExtentions | |
{ | |
private const int ZeroCharCode = '0'; | |
private const int LocalizedZeroCharCode = '۰'; |
using LinqLab.API; | |
using LinqLab.Models; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using MoreLinq; | |
using System; | |
using System.Linq; |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace PhotoSlash | |
{ | |
class Program | |
{ | |
static async Task Main(string[] args) | |
{ |
public class EmailSender : IEmailSender | |
{ | |
public Task SendEmailAsync(string email, string subject, string message) | |
{ | |
SmtpClient client = new SmtpClient("mail.mysite.com") | |
{ | |
UseDefaultCredentials = false | |
}; | |
client.Credentials = new NetworkCredential("noreply@mysite.com", "password"); |