Tag:2.0

  • ASP.NET Problems and solutions of middleware with initial parameters in core 2.0

    Time:2020-11-28

    problem How to ASP.NET Core 2.0 passes initial parameters to middleware? answer In an empty project, create a poco (plain old CLR object) to save the required parameters of middleware: public class GreetingOptions { public string GreetAt { get; set; } public string GreetTo { get; set; } } Add a middleware: public class GreetingMiddleware […]

  • Talking about ASP.NET Core 2.0 middleware with initial parameters

    Time:2020-11-25

    problem How to ASP.NET Core 2.0 passes initial parameters to middleware? answer In an empty project, create a poco (plain old CLR object) to save the required parameters of middleware: public class GreetingOptions { public string GreetAt { get; set; } public string GreetTo { get; set; } } Add a middleware: public class GreetingMiddleware […]

  • ASP.NET Core 2.0 local file operation problems and Solutions

    Time:2020-11-19

    problem How to ASP.NET Limited access to local directory and file information in core 2.0? answer Create an empty project, modify the startup class, and add the services needed to access local files public void ConfigureServices(IServiceCollection services) { services.AddSingleton<IFileProvider>( new PhysicalFileProvider(Directory.GetCurrentDirectory())); } Create a middleware, read all the files in the root directory, and output […]

  • [translation] ASP.NET Core 2.0 routing engine details

    Time:2020-11-17

    This paper introduces the ASP.NET 2. Details of the core are as follows: problem ASP.NET How does the routing engine of core 2.0 work? answer Create an MVC middleware and an empty service class public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseMvc(routes => { routes.MapRoute( name: “goto_one”, template: […]

  • Detailed explanation ASP.NET Core 2.0 view engine

    Time:2020-11-15

    problem How to ASP.NET Using the razor engine to create views in core 2.0? answer Create an empty item, modify Startup.cs Add MVC service and request middleware public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(routes => { routes.MapRoute( name: “default”, template: “{controller=Home}/{action=Index}/{id?}”); }); […]

  • Detailed explanation ASP.NET Web address generation of core 2.0 routing engine

    Time:2020-11-14

    problem How to ASP.NET In core 2.0, the routing engine generates the web address? answer Create an empty item, modify Startup.cs File, add MVC service and middleware: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(routes => { routes.MapRoute( name: “goto_one”, template: “one”, defaults: […]

  • Talking about ASP.NET Core 2.0 layout page

    Time:2020-11-12

    This paper introduces the ASP.NET The core 2.0 layout page is shared with you as follows: problem How to ASP.NET Sharing visible elements, code blocks, and instructions in a core 2.0 project? answer Create an empty project. First add the greetingservice service and the userviewmodel model public interface IGreetingService { string Greet(string firstname, string surname); […]

  • Using identity to store data with dapper in. Net core2.0

    Time:2020-10-23

    Preface I haven’t written a blog for many days. In view of the rise of leisure and boredom, I want to write a blog, so I should make a note for myself. After so many days, my writing is still so bad, please forgive me. Today, I’d like to share some of the actual situations […]

  • ASP.NET Core 2.0 webapi global configuration and log instance

    Time:2020-7-20

    Recently, some of the original webservces are converted into webapi, which is used directly ASP.Net Core 2.0 framework, in use, found with the original asp.net Different places, through the search has been slowly solved, record down for backup. 1、 Global configuration stay asp.net The global change configuration is written in web.config , as shown below […]

  • How to use turbo c 2.0 integrated environment

    Time:2020-7-5

    Turbo C 2.0 integrated environment     1.5 Turbo C 2.0 integrated environment Turbo C 2.0 is a C language integrated environment developed by Borland company of USA. It integrates editing, compiling, linking and running functions. It makes the editing, debugging and testing of C program very simple, the compiling and connecting speed is very […]

  • A detailed explanation of several class libraries commonly used in. Net core project (worth collecting)

    Time:2020-1-14

    Preface It has been nearly 15 years since Microsoft launched. Net platform in 2002. In the wave of rapid Internet iteration, many languages have been eliminated, and more new languages have emerged. But. Net is still firmly standing in the front-line camp of system development platform, and with the arrival of the official version of. […]

  • How to subtract asp.net core web publishing package

    Time:2019-12-14

    1. introduction Next to the previous part: asp.net core web app applies the third-party bootstrap template. In this section, we will talk about how to optimize asp.net core web publishing package. In asp.net core web app, we can install some JS and CSS plug-ins through bower or NPM to facilitate our organization of front-end components. […]