售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright and Credits
ASP.NET Core MVC 2.0 Cookbook
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Get in touch
Reviews
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...
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...
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...
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...
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...
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
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...
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
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...
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...
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...
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...
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...
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...
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...
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
Middleware
HTTP modules and HTTP handlers
Using inline middleware code as anonymous methods - Use, Run, Map, and MapWhen
Getting ready
How to do it...
Creating a reusable middleware component
Getting ready
How to do it...
Migrating an HTTP handler to middleware
Getting ready
How to do it...
Migrating HTTP modules to middleware
Getting ready
How to do it...
Security
Introduction
Authentication in the real world
Authentication sample
Authentication in ASP.NET, using cookie authentication
Getting ready
How to do it...
How it works...
Authentication using authorization servers
Getting ready
How to do it...
Using Facebook as an authorization server
Using Google as an authorization server
How it works...
Managing identity
Getting ready
How to do it...
How it works...
Securing data with Hashing
Getting ready
How to do it...
How it works...
Securing data with Encryption
Getting ready
How to do it...
How it works...
Frontend Development
Using Bootstrap
Getting ready
Advantages of using CDN
How to do it...
How it works...
Writing clean JavaScript
Getting ready
How to do it...
How it works...
RequireJS
Getting ready
How to do it...
How it works...
Typescript
Getting ready
How to do it...
How it works...
Writing and executing unit tests in JavaScript
Getting ready
How to do it...
How it works...
Debugging JavaScript code in browsers
Getting ready
How to do it...
How it works...
Deployment and Hosting
Deployment options
Getting ready
How to do it...
How it works...
Hosting an ASP.NET Core web app on IIS
Getting ready
How to do it...
How it works...
Hosting an ASP.NET Core web application on Kestrel
Getting ready
How to do it...
How it works...
Hosting an ASP.NET Core web app on Azure
Getting ready
How to do it...
Deploying an ASP.NET Core web app to Azure with Visual Studio Code
Deploying an ASP.NET Core web app to Azure with Visual Studio Community Edition
How it works...
Hosting an ASP.NET Core web app in Docker containers
Getting ready
How to do it...
How it works...
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜