.NET Core Ecosystem

.NET
.NET Blog

Application Models

  • Web
  • Mobile
  • Desktop
  • Microservices
  • Gaming
  • Machine Learning
  • Cloud
  • Internet of Things
Language Version
C#
Visual Basic
F# 4.7
Platform Version Feature
.NET Core 3.0 (runs anywhere!) Windows, Linux, and macOS
.NET Framework 4.8 websites, services, and apps on Windows
Xamarin/Mono a .NET for mobile
.NET Standard The one platform, the shared set of libraries for the above

Library

  • Nuget

Tools

  • Visual Studio Marketplace

Learn More

Training Progress
.NET Core 101 (Youtube) 3/8

Resources

7c0fd1fb22f876d67187bed69c89f39c.png
8b0b429a53f265a3175e166a5df22f0a.png

.NET - 3rd Party Resources

.NET Unit Testing Frameworks

  • MsTest
  • xUnit
  • NUnit

MsTest, NUnit, xUnit are test framework, MsTest is what we using right now, but seems xUnit is more clear and lean.

.NET Mock/Fake Frameworks

Code Refactoring

Source Making

  • Design patterns
    • Creational patterns
    • Structural patterns
    • Behavioral patterns
  • AntiPatterns
    • Software Development AntiPatterns
    • Software Architecture AntiPatterns
    • Project Management AntiPatterns
  • Refactoring
    • Code Smells
    • Refactoring techniques
  • UML
    • Introduction
    • Introduction to the Case Study
    • Modeling Business Systems
    • Modeling IT Systems
    • Modeling for System Integration

Refactoring.Guru

  • Refactoring
  • Design Patterns

What's .NET Framework

.NET Framework = Java Runtime (Execution Runtime))
C# = Java (Programming Language)
f2b8b5259201e63c80ed66d7f00aba06.png

Check Project Source Codes

  1. Get/download source codes from code repository (from VSTS)
  2. Restore Nuget Packages
    1. Right-click solution name
    2. Click 'Restore Nuget Packages'
  3. Rebuild
    1. Right-click solution name
    2. Click 'Clean Solution'
    3. Right-click solution name
    4. Click 'Rebuild Solution'

.NET Framework Versioning

How to: Determine which .NET Framework version project developed on

  1. Right-click project name
  2. Click 'Properties' (or Press Alt+Enter)
    e261790991c4c627777a51a9d16b99a0.png

How to: Determine which .NET Framework versions are installed on the Machine

C# Versions

C# Version History

  • C# 6.0 - .NET 4.6, VS 2015
  • C# 7.0 - .NET 4.7, VS 2017
  • C# 8.0 - in preview

Application Types

  • Library
    • Class Library
  • Console
    • Console App
  • Desktop
    • Windows Forms App
    • WPF App (Windows Presentation Foundation) - XAML
  • Web
    • ASP.NET Web Site - Script block in web page source
    • ASP.NET Web Forms - .aspx + .cs
    • ASP.NET Web App - .cshtml (Razor) + .cs
      • ASP.NET MVC - for dynamic web pages
      • ASP.NET Web API - for REST API

Console App

Set Console App Project as StartUp Project

  1. Right-click project name
  2. Click 'Set as StartUp Project'
Program Entry
  • File: Program.cs
  • Method:
static void Main(string[] args)
* args: Console command parameters, e.g. myApp param1, param2, ..., paramN
Exception Handling
try{
    // logic
}
catch(Exception ex){
    // execute when specific exception/error happends
}
Conditional Statements
Log Level
  • Debug
  • Info
  • Warn
  • Error
  • Fatal

API Error Handling

  • HTTP 200 + Succeed Flag = Logical Correct
  • HTTP 200 + Failed Flag = Logical Incorrect
  • HTTP 404/500 (Web Server/Software Error, Authentication Error) = Application Error
  • HTTP 505 (Network Not Found) = Network Error

HTTP Method

  • HTTP GET (URL only)
  • POST (with HTTP body)
  • HEAD
  • OPTION (query description doc)
  • PUT
  • DELETE

HTTP Request/Response Model

  • Request
    • HTTP URL
    • HTTP Headers (including cookies)
    • HTTP Body
  • Response
    • HTTP Headers (including return code)
    • HTTP Body
JSON (JavaScript Object Notation)
  • Serialize: Object(s) -> JSON text/string
  • Deserialize: JSON text/string -> Object(s)
Generic Type
public static FunctionName<T>
Variable Types
  • Reference Type (Class, ref)
    • Pass itself into function, and will be returned back with value changes in function
  • Value Type (Structure, basic types e.g. numbers)
    • Pass its shadow copy and original variable will not be impact
C# Lambda Expressions

C# Lambda Expressions

Enumerable.Aggregate Method

posted @ 2022-03-31 09:42  桁椽  阅读(75)  评论(0编辑  收藏  举报