NetCore Top questions

Post

New Post


Find by name:

NetCore First Name PostDate
How to handle 404 error in ASP.NET Core 1.0 I found 2 ways to handle 404 error. In fact using these solution you can handle any HTTP status code errors. To handle the error, both the solution are using configure() method of Startup.cs class
How do you define a route in ASP.NET Core 9 MVC? In ASP.NET Core MVC, routing decides how incoming HTTP requests map to controller actions. You configure routes inside Program.cs (or Startup.cs in older versions) using endpoint routing:
Can you explain Service Lifetime in AspNet Core? Built-in IoC container manages the lifetime of a registered service type. It automatically disposes a service instance based on the specified lifetime. The built-in IoC container supports three kinds of lifetimes: Singleton: IoC container will create and share a single instance of a service throughout the application's lifetime. Transient: The IoC container will create a new instance of the specified service type every time you ask for it. Scoped: IoC container will create an instance of the specified service type once per request and will be shared in a single request.