11/11/2021

ASP.NET core web api best practice

 

TABLE OF CONTENTS
Introduction ..................................................................................2
Startup Class and the Service Configuration ......................................3
Project Organization.......................................................................5
Environment Based Settings............................................................6
Data Access Layer..........................................................................7
Controllers ....................................................................................8
Actions .........................................................................................9
Handling Errors Globally ............................................................... 11
Using ActionFilters to Remove Duplicated Code................................ 13
Using DTOs to Return Results and to Accept Inputs.......................... 14
Routing....................................................................................... 15
Logging ...................................................................................... 17
Paging, Searching, Sorting ............................................................ 18
Versioning APIs ........................................................................... 18
Using Asynchronous Code ............................................................. 19
Caching ...................................................................................... 21
Using ReadFormAsync Method ....................................................... 22
CryptoHelper And Data Protection .................................................. 24
Content Negotiation ..................................................................... 26
Security and Using JWT ................................................................ 27
Testing Our Applications ............................................................... 29
Conclusion .................................................................................. 29

Không có nhận xét nào:

Đăng nhận xét

Đăng ký tên miền, hosting, máy chủ, thiết kế lập trình website theo yêu cầu

 Chính thức trở thành đơn vị cung cấp dịch vụ đăng ký tên miền quốc tế, tên miền Việt Nam hosting, máy chủ, cloud hosting, cloud server, ema...