Skip to content

.NET Core

Thang Chung edited this page Aug 5, 2021 · 29 revisions

Refs projects

.NET 6

gRPC Load Balancer

Metrics

MsBuild

  • For many properties, it doesn't matter where they're defined, because they're not overwritten and will be read-only at execution time.
  • Set defaults in .props files for behavior that might be customized in an individual project.
  • Avoid setting dependent properties in .props files by reading the value of a possibly customized property, because the customization won't happen until the user project.
  • Set dependent properties in .targets files, because they'll pick up customizations from individual projects.
  • If you need to override properties, do it in a .targets file after all user-project customizations have had a chance to kick in. But be wary of derived properties--they may need to be overridden as well.
  • Include items in .props files (conditioned on a property). All properties are considered before any item, so user-project property customizations will be picked up, and this gives the user project the opportunity to Remove or Update any item brought in by the import.
  • Define targets in .targets files. But remember that this makes overriding the target more difficult if the .targets file is imported by an SDK because the user project doesn't have a place to override it by default.
  • Prefer customizing properties at evaluation time over changing properties inside a target if possible. This makes it easier to load a project and understand what it's doing.
  • https://github.com/MicrosoftDocs/visualstudio-docs/issues/2774
    • .props files are imported early in the import order.
    • .targets files are imported late in the build order.

Dapper

EF Core

  • Install EF Core latest tools
$ dotnet tool update --global dotnet-ef --version 6.0.0-preview.5.21301.9

Workflow

MessagePipe vs MediatR

Rest

Clean Architecture

The image source is at https://pixabay.com/vi/illustrations/hoa-sen-chim-m%C3%A8o-c%E1%BB%A7a-kh%E1%BB%91i-l%E1%BA%ADp-ph%C6%B0%C6%A1ng-3650472/

What makes the software development world close to the natural world!

In Vietnam and some countries around Asia, we have a kind of flower calls lotus. We see it in childhood and most of the Vietnamese people know and love lotus flower.

The image source is at PixaBay

It has an attribute and shape just like the software architecture we are building nowadays. Love it that much!

Testing

Api versioning

Outbox

TraceId from HttpContext

i18n

Logs for ES

SoC on Controller

Caching strategy

SMTP

AOP on AOT mode

This AOP lib can work with AOT mode: https://github.com/pamidur/aspect-injector

https://stackoverflow.com/questions/925609/mixins-vs-traits https://en.wikipedia.org/wiki/Trait_(computer_programming) https://www.yegor256.com/2017/03/07/traits-and-mixins.html

Source Generators for Endpoint/Controllers

Managing Package Versions Centrally

UML tool with C4 approach: https://github.com/plantuml-stdlib/C4-PlantUML

Clone this wiki locally