Posts Categorized: C#

Transaction Management in Systems using .NET Core and MS SQL

Introduction In financial or e-commerce systems, managing financial transactions is a crucial part. Each transaction can consist of multiple components such as purchasing items, platform fees, or payment gateway fees. To ensure data integrity and transparency, the system needs a mechanism to record transactions and financial journals clearly and accurately. This article will guide you […]

[C#] Dependency Injection in Console App

Trong quá trình làm dự án chắc hẳn bạn cũng đã có lúc cần test thử function mình viết mà không cần phải run cả 1 dự án cồng kềnh. Đó chính là lúc console app phát huy tác dụng. Các bạn có thể tạo 1 console app và Inject service mình cần debug vào […]

[XUnit] Collect coverage UT

Các nuget package yêu cầu xUnit (>= v2.4.1) xUnit.runner.visualstudio (>= v2.4.1) Moq (>= v4.13.1) dotnet-reportgenerator-cli (>= 4.3.6) coverlet.collector (>= 3.1.2) Lấy coverage cho 1 project cụ thể Mở powershell cd tới project Unit test bạn cần Run câu lệnh bên dưới Màn hình powershell sẽ hiện massage như sau Sau khi chạy xong sẽ xuất […]