Code and Coder: about .net core, C#, Delphi, Codetyphon, Freepascal, C++,Python, website technical records

Posted in category [.Net]

ASP.NET Core Web API Best Practice Guide

Introduction When we write a project, our main goal is to make it run as scheduled and meet all user needs as much as possible. But don't you think that creating a working project is not enough? Shouldn't this project also be maintainable and readable? It turns out that we need to focus more on the readability and maintainability of our projects. The main reason behind this is that we may not be the only authors of this project. Once we are done, it is very likely that others will join in. So where should we focus our attention? In...

DotNET Core RSA Guide and Enhanced Extensions RSAExtensions

DotNET Core RSA Guide and Enhanced Extensions RSAExtensions

Label printing based on Win service (template printing) using dotnet

Several projects have been done recently, and there is a demand for product labeling Basically, there is a card printer, and then the product information is printed on the label. Then use a robot to attach the label to the product The label information includes text, two-dimensional code, bar code and the like, and two-dimensional code and bar code should be generated according to corresponding data. After receiving the demand for printing labels, I started my journey to fill the pits.   Print 3.0 source code: https://g...

DotNET Core uses RabbitMQ

DotNET Core uses RabbitMQ Demos and how to examples

ASP.NET Core3.X Terminal Middleware Conversion to Endpoint Routing

introduction A few days ago, .NET Core3.1 was released, so I upgraded a basic general system of the company, and deleted several basic modules. Of course, these basic modules are not related to .NET Core3.1, including the payment module. The upgrade is complete. Hou Jingwen (colleague) asked me that you deleted the payment? I said yes, I didn't think about how to add it (I don't think it is very good at the moment, I need to redesign it). The story starts here When thinking about payment, I think about how to introduce payment SDK directly i...

Build and restore ASP.NET Core source code in Windows system

Hello everyone, these days I tried to pull the source code of AspNetCore from Github and tried to open it through Visual Studio, but it was not satisfactory. We need to build the source code we pulled so that we can restore the project through VisualStudio. After all, AspNetCore is a huge project set. prerequisites # The requirements for building the AspNetCore source code in Windows have the following hardware requirements. Windows 10 version 1803 or higher At least 10 GB of disk space and good network (our build script downloads ...

C # encrypt and decrypt PDF documents

For the purpose of protecting some important documents, the document opening permissions or editing and operation permissions are often set by encrypting the documents. The following example content will share the method of encrypting PDF documents by C # programming. This method introduces setting two kinds of encryption passwords for document opening password and permission password to protect documents. The document open password can only be used to open the document, and the permission password is a higher-level password, which can be used ...

ASP.NET Core 3 File System [3] Physical File System

The most commonly used ASP.NET Core applications are specific physical files, such as configuration files, View files, and static files as Web resources. The physical file system is constructed by a PhysicalFileProvider defined in NuGet package ” Microsoft.Extensions.FileProviders.Physical “. We know that the System.IO namespace defines a complete set of APIs for manipulating physical directories and files. In fact, PhysicalFileProvider also finally calls these APIs to complete related IO operations.

DotNET Core 3.0 uses Nswag to generate Api documents and client code

In the era of front and back separation and the popularity of Restful APIs, perfect interface documents have become a link for communication. Introducing Swagger (also known as OpenAPI) in your project is a good choice to visualize interface data. Will be demonstrated below

How to generate Api documents with Nswag

How to use NSwagStudio to generate client code and test it

ASP.NET Core gRPC uses Consul service to register and discover

The most common application of gRPC is in the microservices scenario, so service registration and discovery problems are inevitable. The services we use gRPC can use Consul or etcd as service registration and discovery centers. This article mainly introduces Consul.