ASP.NET Core MVC 2.0 Cookbook
Learn to implement ASP.NET Core features to build effective software that can be scaled and maintained easily About This Book Practical solutions to recurring issues in the web development world Recipes on the latest features of ASP.Net Core 2.0 Coverage of Bootstrap, Angular, and JavaScript lets yo...
Otros Autores: | , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Packt Publishing
2018.
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009631587406719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Table of Contents
- Preface
- Chapter 1: Cross-Platform with .NET Core
- What is ASP.NET Core 2.0?
- What's new in ASP.NET and CLR?
- Installing or updating .NET Core
- How to do it...
- How it works...
- Managing NuGet packages in ASP.NET Core applications
- How to do it...
- Creating an ASP.NET Core MVC application on Linux
- Getting ready
- How to do it...
- How it works...
- Creating an ASP.NET Core MVC application on Linux with Docker
- Getting ready
- How to do it...
- How it works...
- Creating an ASP.NET Core MVC application on macOS
- Getting ready
- How to do it...
- Creating and running an ASP.NET Core MVC application on Azure
- Getting started
- How to do it...
- How it works...
- Chapter 2: Visual Studio 2017, C# 6, IDEs, and Roslyn
- Introduction
- Working with Visual Studio 2017
- How to do it...
- Working with Visual Studio Code
- Getting ready
- How to do it...
- How it works...
- Installing and using OmniSharp on macOS
- How to do it...
- How it works...
- See also
- Installing and using OmniSharp on Linux
- Getting ready
- How to do it...
- Working with Roslyn
- Getting ready
- How to do it...
- How it works...
- APIs
- Using C# 6 new features
- How to do it...
- See also...
- Chapter 3: Working with npm, Frontend Package Managers, and Task Runners
- Introduction
- Using and creating npm modules
- Getting ready
- How to do it...
- Creating a node package
- Publishing the package
- How it works...
- There's more...
- Managing frontend dependencies with Bower
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Compiling LESS files to CSS files with Grunt
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also.
- Bundling and minifying JavaScript files with Gulp
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using Yeoman code-generated templates
- Getting ready
- How to do it...
- How it works...
- Using JSPM
- Getting ready
- How to do it...
- How it works...
- Chapter 4: Reusing Code with NuGet
- Introduction
- Managing NuGet packages
- Getting ready
- How to do it...
- See also
- Creating a NuGet package with the NuGet package class library
- Getting ready
- How to do it...
- The old way
- The new way
- Creating a local NuGet repository and consuming packages from it
- How to do it...
- Creating a NuGet package with NuGet Package Explorer
- How to do it...
- Sharing NuGet packages with the community
- How to do it...
- Creating an Azure NuGet repository
- How to do it...
- Chapter 5: SOLID Principles, Inversion of Control, and Dependency Injection
- Introduction
- SOLID principles
- Inversion of control
- Dependency injection (DI)
- DI containers
- Configuring a DI container
- IOC versus service locator
- Life cycles
- Implementing DI with Native IOC in ASP.NET Core
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using the life cycles available in ASP.NET Core
- Getting ready
- How to do it...
- How it works...
- Implementing DI with Autofac
- Getting ready
- How to do it...
- How it works...
- Implementing DI with StructureMap
- How to do it...
- How it works...
- Implementing DI with DryIoc
- Getting ready
- How to do it...
- How it works...
- Chapter 6: Data Access - EF7 with Repository, SQL Server, and Stored Procedures
- Introduction
- DbContext
- Entity Framework (EF) approach
- Configuring the IOC life cycle for the repository pattern
- Getting ready
- How to do it...
- Using EF with an existing database
- Getting ready.
- How to do it...
- Using an InMemory provider
- Getting ready
- How to do it...
- How it works...
- Managing a long request batch
- Getting ready
- How to do it...
- There's more...
- Using a stored procedure with EF
- Getting ready
- How to do it...
- Writing an EF provider
- Getting ready
- How to do it...
- See also
- Chapter 7: Accessing data with Micro ORMs, NoSQL, and Azure
- Introduction
- Micro ORMs
- NoSQL
- Accessing data with Dapper
- Getting ready
- How to do it...
- There's more...
- Accessing data with OrmLite
- Getting ready
- How to do it...
- Accessing data with MongoDb
- Getting ready
- How to do it...
- How it works...
- There's more...
- Accessing data with Windows Azure storage tables
- Getting ready
- How to do it...
- How it works...
- Accessing data with Azure storage Blobs
- Getting ready
- How to do it...
- Accessing data with SQL Azure
- Getting ready
- How to do it...
- Chapter 8: Cache and Session - Distributed, Server, and Client
- Introduction
- Using .NET Cache with MemoryCache
- Getting ready
- How to do it...
- Caching HTML with Cache TagHelpers
- Getting ready
- How to do it...
- How it works...
- Using ResponseCache attribute
- Getting ready
- How to do it...
- How it works...
- Using Session
- Getting ready
- How to do it......
- How it works...
- Using Redis as Cache on-Premises
- Getting ready
- How to do it...
- How it works...
- Using Redis as a cache on Azure
- Getting ready
- How to do it...
- Caching with HTML5 cache manifest
- Getting ready
- How to do it...
- How it works......
- Caching with HTML5 localStorage and sessionStorage
- Getting ready
- How to do it...
- How it works......
- See also
- Chapter 9: Routing
- Before ASP.NET Core
- Since ASP.NET Core
- MVC and Web API routing
- The route order
- Routing with ASP.NET Core.
- Creating a route using convention routing
- How to do it...
- How it works...
- Creating a route using attribute routing
- Getting ready
- How to do it...
- Creating a custom route using IRouter
- Getting ready
- How to do it...
- Creating a route constraint
- Getting ready
- How to do it...
- How it works...
- Creating a domain route
- Getting ready
- How to do it...
- Creating SEO-friendly routes
- Getting ready
- How to do it...
- Chapter 10: ASP.NET Core MVC
- Injecting dependencies and configuring IoC for a controller
- Getting ready
- How to do it...
- Using ActionResults
- Getting ready
- How to do it...
- Creating and working with areas
- Getting ready
- How to do it...
- Creating and using POCO controllers
- Getting ready
- How to do it...
- Creating and using controllers with MediatR
- Getting ready
- How to do it...
- How it works...
- Managing exceptions
- Getting ready
- How to do it...
- Chapter 11: Web API
- Using ActionResult
- Getting ready
- How to do it...
- How it works...
- Configuring content negotiation
- Getting ready
- How to do it...
- Configuring cross-domain origin requests
- Getting ready
- How to do it...
- Using Swagger
- Getting ready
- How to do it...
- How it works...
- Testing Web API
- Getting ready
- How to do it...
- There's more...
- Managing exceptions
- Getting ready
- How to do it...
- There's more...
- Chapter 12: Filters
- Introduction
- Managing authentication and authorization with policies, requirements, and filters
- Getting ready
- How to do it...
- Authentication
- There's more...
- Managing dependency injection with filters
- Getting ready
- How to do it...
- How it works...
- Creating and using an action filter
- Getting ready
- How to do it...
- Creating and using a result filter
- Getting ready
- How to do it.
- Creating and using a resource filter
- Getting ready
- How to do it...
- Creating and using an exception filter
- Getting ready
- How to do it...
- Using a filter globally versus using a middleware
- Getting ready
- How to do it...
- There's more...
- Chapter 13: Views, Models, and ViewModels
- Creating and using a ViewModel with AutoMapper
- Getting ready
- How to do it...
- Understanding and using ModelBinding
- Getting ready
- How to do it...
- How it works...
- Creating our own model binder
- Getting ready
- How to do it...
- Understanding and using a value provider
- Getting ready
- How to do it...
- Configuring and using validation
- Getting ready
- How to do it...
- Chapter 14: Razor and Views
- Managing namespaces in views with ViewImports
- Getting ready
- How to do it...
- Creating a strongly typed Partial view
- Getting ready
- How to do it...
- Configuring view and area locations
- Getting ready
- How to do it...
- How it works...
- Using dependency injection in views
- Getting ready
- How to do it...
- Creating HTMLHelpers
- Getting ready
- How to do it...
- How it works...
- Chapter 15: TagHelpers and ViewComponents
- Using Environment, Script, and Link TagHelpers
- Getting ready
- How to do it...
- Using Form TagHelpers
- Getting ready
- How to do it...
- Creating TagHelpers programmatically
- Getting ready
- How to do it...
- There's more...
- Creating a reusable view component
- Getting ready
- How to do it...
- How it works...
- Creating a view component/controller class
- Getting ready
- How to do it...
- How it works...
- Chapter 16: OWIN and Middleware
- Understanding OWIN, Katana, and the new ASP.NET Core HTTP pipeline
- OWIN - an abstraction for decoupling
- Katana - the Microsoft OWIN implementation
- A new OWIN implementation with ASP.NET Core.
- The ASP.NET Core pipeline.