Docsity

Asp.NET Core 3: Lifetime de instancias de clases y bundling y minificación, Apuntes de Programación Funcional

Toggle sidebar
bg1
ASP.NET CORE 3
Dependency Injection Object Lifetime
The lifetime of a class instance is managed by the container.
Transient Lifetime: New instance of the object is created every time it is asked for.
Scoped Lifetime: The instance will until the request is completely handled
Singleton Instance: A single instance will be created and supplied until the app closes.
Bundling and Minification:
// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
{
"outputFileName": "wwwroot/css/all.min.css",
// An array of relative input file paths. Globbing patterns
supported
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css",
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/css/bootstrap.css",
// An array of relative input file paths. Globbing patterns
supported
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css"
],
"minify": {
"enabled": false
}
}
]

Vista previa parcial del texto

¡Descarga Asp.NET Core 3: Lifetime de instancias de clases y bundling y minificación y más Apuntes en PDF de Programación Funcional solo en Docsity!

ASP.NET CORE 3

Dependency Injection Object Lifetime

The lifetime of a class instance is managed by the container.

Transient Lifetime: New instance of the object is created every time it is asked for.

Scoped Lifetime: The instance will until the request is completely handled

Singleton Instance: A single instance will be created and supplied until the app closes.

Bundling and Minification:

// Configure bundling and minification for the project. // More info at https://go.microsoft.com/fwlink/?LinkId= [ { "outputFileName": "wwwroot/css/all.min.css", // An array of relative input file paths. Globbing patterns supported "inputFiles": [ "wwwroot/lib/bootstrap/dist/css/bootstrap.css", "wwwroot/css/site.css" ] }, { "outputFileName": "wwwroot/css/bootstrap.css", // An array of relative input file paths. Globbing patterns supported "inputFiles": [ "wwwroot/lib/bootstrap/dist/css/bootstrap.css" ], "minify": { "enabled": false } } ]