Tag:.net

  • . net core practical skills — display the SQL statements generated by EF core in the console

    Time:2021-1-19

    preface Recently, the author is developing and maintaining a. Net core project, which uses several very interesting. Net core related extensions. Here is a summary. EF core performance tuning If you use EF core in your project and are in the stage of performance tuning, it is very important to understand the SQL statements generated […]

  • In depth explanation of ASP. Net core static file resources

    Time:2021-1-18

    preface For a simple overview of static resources, we will go deep into it later in the series of reorganizing. Net core. text When we add middleware, we write as follows: app.UseStaticFiles(); The default is to provide resources for wwwroot. So I’ll visit https://localhost :44330/js/ site.js Resources can be accessed. // Please see documentation at […]

  • How to use shell script to execute. Net core application

    Time:2021-1-16

    In this article, I’ll look at how to create shell scripts to run simple. Net core applications. The reason why we have this research topic is because of our website( pzy.io )The database needs to be backed up regularly every day, and after the backup is completed, the backup files are uploaded to the remote […]

  • The difference between StringBuilder and textwriter in. Net

    Time:2021-1-15

    Recently, I read some open source class libraries in my spare time. I found that some class libraries like to use textwriter class to record related string data. I’m curious why we don’t use StringBuilder class objects. So I searched the Internet and summarized the relevant notes. StringBuilder class In. Net, as a basic data […]

  • How to use Kafka in. Net core

    Time:2021-1-12

    install CentOS install Kafka Kafka : http://kafka.apache.org/downloads ZooLeeper : https://zookeeper.apache.org/releases.html Download and unzip #Download and unzip $ wget https://archive.apache.org/dist/kafka/2.1.1/kafka_2.12-2.1.1.tgz $ tar -zxvf kafka_2.12-2.1.1.tgz $ mv kafka_2.12-2.1.1.tgz /data/kafka #Download zookeeper and unzip it $ wget https://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.8/apache-zookeeper-3.5.8-bin.tar.gz $ tar -zxvf apache-zookeeper-3.5.8-bin.tar.gz $ mv apache-zookeeper-3.5.8-bin /data/zookeeper Start zookeeper #Copy configuration template $ cd /data/kafka/conf $ cp zoo_sample.cfg zoo.cfg […]

  • Methods and steps of logging with log4net under. Net core

    Time:2021-1-11

    Log4NetI believe everyone is familiar with it. It’s a mainstream and famous log component. Official website:logging.apache.org Open source address:https://github.com/apache/logging-log4net Best practices Adding component packages to a project Install-Package log4net add tolog4net.configfile <?xml version=”1.0″ encoding=”utf-8″ ?> <configuration> <configSections> <section name=”log4net” type=”log4net.Config.Log4NetConfigurationSectionHandler, log4net”/> </configSections> <log4net debug=”false”> <appender name=”info” type=”log4net.Appender.RollingFileAppender,log4net”> <param name=”File” value=”log4net/info/” /> <param name=”AppendToFile” value=”true” /> […]

  • . net core3.1 to send subscription message by wechat applet

    Time:2021-1-10

    1 appsettings.json Define applet configuration information “WX”: {   ”AppId”: “wx88822730803edd44″,   ”AppSecret”: “75b269042e8b5026e6ed14aa24ba9353″,   ”Templates”: {   ”Audit”: {     ”TemplateId”: “aBaIjTsPBluYtj2tzotzpowsDDBGLhXQkwrScupnQsM”,     ”PageUrl”: “/pages/index/formAudit?formId={0}&tableId={1}”,     ”MiniprogramState”: “developer”,     ”Lang”: “zh_TW”,     ”Data”: {         ”Title”: “thing6″,         ”Content”: “thing19″,         ”Date”: “date9″       }     }   },   ”SignatureToken”: “aaaaaa”,   ”MessageSendUrl”: “https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token={0}”,   ”AccessTokenUrl”: “https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}” } 2、 Write general class loading configuration using System; using System.Text; using System.Security.Cryptography; using […]

  • How to use diagnosticsource in. Net

    Time:2021-1-9

    preface Diagnosticsource is a very interesting and useful API. For these APIs, they allow different libraries to send named events, and they also allow applications to subscribe to these events and process them. It enables our consumers to dynamically discover data sources at runtime and subscribe to their related data sources. Diagnosticsource is used in […]

  • Python crawling: crawler

    Time:2021-1-6

    The text and pictures of this article are from the Internet, only for learning and communication, and do not have any commercial use. The copyright belongs to the original author. If you have any questions, please contact us in time This article from Tencent cloud Author: lonely moon Objective: to simply obtain the fund data […]

  • Sample code of sending e-mail by using fluent email in. Net core

    Time:2021-1-2

    preface In the actual project development, we will encounter many scenarios that need to send mail through the program, such as exception alarm, message, progress notification and so on. Generally, we use the native smtpclient class library, which can meet most of our scenarios. But it is not concise enough to use. Many scenarios need […]

  • How to use grpc in. Net core

    Time:2021-1-1

    1、 Overview of grpc Grpc is based on the following idea: define a service, specify the methods, parameters and return types that can be called remotely. By default, grpc uses protocol buffers as the interface definition language to describe the service interface and payload message structure. If necessary, other alternatives can be used. There are […]

  • Implementation of configuration in. Net core3.0

    Time:2020-12-29

    get ready The configuration of. Net core and. Net project has been greatly changed, and the support is also more abundant, such as command line, environment variables, in memory. Net objects, setting files and so on. For. Net projects, we often put configuration information into webconfig or AppConfig. Configuration related source codehttps://github.com/aspnet/Extensions; if you open […]