Our Ironclad Guarantee
You must be satisfied. Try our print books for 30 days or our eBooks for 14 days. If they aren't the best you've ever used, you can return the books or cancel the eBooks for a prompt refund. No questions asked!
If you understand HTML/CSS and C#, you’re ready to learn how to develop ASP.NET Core MVC apps with our latest web programming book.
Go to our instructor’s site to learn more about this book and its instructor’s materials.
I'm a first-time customer who has recently purchased your ASP.NET Core MVC book, and I have to say I'm greatly impressed. I appreciate how the content has been structured throughout. [It] was actually fun from start to finish (and I've read many, many programming books before).”
To get you started fast, this 5-chapter section shows how to use Visual Studio to design, code, and test multi-page ASP.NET Core apps that use the MVC pattern, work with a database, and use Bootstrap to make the apps look great on all screen sizes. After that, you’re ready to review and expand upon this section to raise your skills up to a professional level.
This 8-chapter section presents the ASP.NET Core MVC skills you’ll use every day:
This 4-chapter section presents skills that will take your web development skills to the next level:
This book is for anyone who knows the basics of HTML/CSS and C# and wants to learn how to use the ASP.NET Core platform to develop MVC web apps. That’s true whether you’re new to web development or whether you have experience with another web development platform.
To program using this book, you can install Visual Studio with the .NET Core workload as described in appendix A (Windows) or B (macOS). On Windows, this installs all the software you need, including:
On macOS, installing Visual Studio installs all of the software you need, except SQL Server Express LocalDB. Since LocalDB isn’t supported on macOS, we recommend using SQLite instead as described in appendix B.
The first 8 chapters of Murach’s HTML5 and CSS3 present the HTML and CSS skills that you need as a prerequisite to developing ASP.NET Core MVC web apps. Similarly, the first 3 sections of Murach’s C# (7th Edition) present the C# programming skills that you need.
Both of these books work for beginners as well as professionals. They let you learn new skills whenever you need them. And they’re the best on-the-job reference books that money can buy.
“Just a note to say WOW! Your launch of the ASP.NET Core MVC text is a much needed contribution to the topic of ASP.NET Core. Loads of important information all in one place.”
- K.S., College Instructor, Chicago, Illinois
“I'm a first-time customer who has recently purchased your ASP.NET Core MVC book, and I have to say I'm greatly impressed. I appreciate how the content has been structured throughout. My biggest gripe with most programming books is they tend to ramble on with irrelevant details, with a sea of code being scattered across multiple pages. I'm glad to experience your different approach to formatting; I think it's a great method for learning.”
- Shannon Fairchild, Senior Software Developer, Kingston, Ontario, Canada
“This is the best book on ASP.Net Core by far.”
- Posted at an online bookseller
“A sound investment: Used to refresh my knowledge and to migrate from asp.net mvc 5 to asp.net core mvc 3. This is the 4th book by Murach that I’ve read; like the others, it provides solid knowledge, presented in stages and very well explained.”
- Posted in French at an online bookseller
“There are a total of 17 chapters, and the first 5 chapters alone could suffice for most of the development needs on ASP.NET Core MVC 3. All the rest of the book are insights of all kinds, and I was very surprised at how much nothing is taken for granted and how far you go into the maze of the framework. Truly a very complete book.”
- Luigi Zambetti, Engineer, Milan, Italy
“Murach has a stellar reputation for producing excellent technical books and training material, and this title on ASP.NET Core MVC development is no different. I found the coverage of the topic to be perfect for my training classes, and the end-of-chapter exercises all worked. My students were equally happy with the book.”
- Mark Dunn, Trainer, Georgia
View the table of contents for this book in a PDF: Table of Contents (PDF)
Click on any chapter title to display or hide its content.
The components of a web app
How static web pages are processed
How dynamic web pages are processed
An introduction to the MVC pattern
Three ASP.NET programming models for web apps
Some web components of .NET and .NET Core
An introduction to ASP.NET Core middleware
How state works in a web app
An introduction to Visual Studio
An introduction to Visual Studio Code
How coding by convention works
How a controller passes a model to a view
How a view uses Razor code, tag helpers, and Bootstrap CSS classes
How the Startup.cs file configures the middleware for an app
How to start a new web app
How to select a template
How to set up the MVC folders
How to add a controller
How to add a Razor view
How to configure an MVC web app
How to run a web app
How to find and fix errors
How to add a model
How to add a Razor view imports page
How to code a strongly-typed view
How to handle GET and POST requests
How to work with a strongly-typed view
The Future Value app after handling GET and POST requests
How to add a CSS style sheet
How to add a Razor layout, view start, and view
The code for a Razor layout, view start, and view
How to set data validation rules in the model
The model class with data validation
How to check the data validation
How to display validation error messages
The Future Value app after validating data
A responsive user interface
How to add client-side libraries such as Bootstrap and jQuery
How to manage client-side libraries with LibMan
How to enable client-side libraries
The classes of the Bootstrap grid system
How the Bootstrap grid system works
How to work with forms
How to work with buttons, images, and jumbotrons
How to work with margins and padding
The code for the view of the Future Value app
How to format HTML tables
How to align and capitalize text
How to provide context
How to work with button groups
How to work with icons and badges
How to work with button dropdowns
How to work with list groups
How to work with alerts and breadcrumbs
How to create navs
How to create navbars
How to position navbars
The pages of the app
The folders and files of the app
How to add EF Core to your project
How to create a DbContext class
How to seed initial data
How to add a connection string
How to enable dependency injection
How to use migrations to create the database
How to select data
How to insert, update, and delete data
How to view the generated SQL statements
The Home controller
The Home/Index view
The Movie controller
The Movie/Edit view
The Movie/Delete view
How to relate one entity to another
How to update the DbContext class and the seed data
How to use migrations to update the database
How to select related data and display it on the Movie List page
How to display related data on the Add and Edit Movie pages
How to make URLs lowercase with a trailing slash
How to add a slug
How to run a web app
How to use the browser’s developer tools
How to use the Internal Server Error page
How to use the Exception Helper
How to use breakpoints
How to work in break mode
How to monitor variables and expressions
How to use tracepoints
How to configure the default route
How the default route works
How to code a simple controller and its actions
How to code a controller that uses the id segment
How to include static content in a route
How to work with multiple routing patterns
How to change the routing for an action
More skills for changing the routing for an action
How to change the routing for a controller
How to set up areas
How to associate controllers with areas
How to work with code blocks and inline expressions
How to code inline loops
How to code inline conditional statements
The starting folders and files for an app
How to code controllers that return views
How to create a default layout and enable tag helpers
How to use tag helpers to generate URLs for links
Three views that use the default layout and tag helpers
The three views displayed in a browser
More tag helpers for generating URLs for links
How to format numbers in a view
How to pass a model to a view
How to display model properties in a view
How to bind model properties to HTML elements
How to bind a list of items to an element
How to display a list of model objects
How to create and apply a layout
How to nest layouts
How to use view context
How to use sections
The user interface for customers
The user interface for administrators
An introduction to ActionResult subtypes
How to return ActionResult objects
How to use the ViewData property
How to use the ViewBag property
The user interface
The model layer
The Home controller
The layout
The Home/Index view
How to create a view model
The updated Index() action method
The updated Home/Index view
How to use the ActionResult classes for redirection
How to use the Post-Redirect-Get pattern
How to get started with TempData
How to use methods of the TempData dictionary
The user interface
The view model classes
The Details() action method
The Home/Index view
The Home/Details view
Six ways to maintain state
An introduction to session state
How to configure an app to use session state
How to work with session state items in a controller
How to get session state values in a view
How to use JSON to store objects in session state
How to extend the ISession interface
How to use a wrapper class
The user interface
The session classes
The Home controller
The layout
The Home/Index view
The Home/Details view
The Favorites controller
The Favorites/Index view
How to work with session cookies
How to work with persistent cookies
The cookies class
The updated session class
The updated Home controller
The updated Favorites controller
How to use controller properties to retrieve GET and POST data
How to use model binding to retrieve GET and POST data
How to use model binding with complex types
An action method that binds to primitive types
An action method that binds to complex types
Two ways to code a submit button
How to use a submit button to post a name/value pair
How to post an array to an action method
How to control the source of bound values
How to control which values are bound
The user interface
The entity classes
The database context class
A utility class for filtering
The Home controller
The layout
The Home/Index view
The Home/Add view
The default data validation provided by model binding
How to use data attributes for validation
A Registration page with data validation
How to format validation messages with CSS
How to check validation state and use code to set validation messages
How to display model-level and property-level validation messages
How to enable client-side validation
How to create a custom data attribute
How to pass values to a custom data attribute
How to check multiple properties
How to add data attributes to the generated HTML
How to add a validation method to the jQuery validation library
How to work with remote validation
The user interface and CSS
The Customer and RegistrationContext classes
The MinimumAgeAttribute class
The minimum-age JavaScript file
The Validation and Register controllers
The layout
The Register/Index view
How to code entity and DB context classes
How to configure the database
How to manage configuration files
EF commands for working with a database
How to use EF migration commands
How entities are related
How to configure a one-to-many relationship
How to configure a one-to-one relationship
How to configure a many-to-many relationship
How to control delete behavior
The entity classes
The context and configuration classes
How to generate DB context and entity classes
How to configure a generated DB context class
How to modify a generated entity class
How to query data
How to work with projections and related entities
How to insert, update, and delete data
How to check for concurrency conflicts
How handle a concurrency exception
How to code a data access class
How to use a generic query options class
How to use the repository pattern
How to use the unit of work pattern
The end user pages
The admin user pages
The folders and files
Extension methods for sessions and strings
The generic QueryOptions class
The generic Repository class
The custom route and the GridDTO class
The RouteDictionary class
The GridBuilder class
The Author/List view model and the Author controller
The Author/List view
The custom route and the BooksGridDTO class
The FilterPrefix class and the updated RouteDictionary class
The BooksGridBuilder class
The BookQueryOptions and BookstoreUnitOfWork classes
The Book/List view model and the Book controller
The Book/List view
Extension methods for cookies
The user interface
The model classes
The Cart controller
The Cart/Index view
The user interface
The SearchData and SearchViewModel classes
The Search() action methods of the Book controller
The Delete() action method of the Genre controller
How to configure your app for DI
How to use DI with controllers
How to use DI with an HttpContextAccessor object
How to use DI with action methods
How to use DI with views
How unit tests work
How to add an xUnit project to a solution
How to write a unit test
How to run a unit test
How to use a fake repository object
How to use a fake TempData object
How to work with mock objects
How to mock a repository object
How to mock a TempData object
How to mock an HttpContextAccessor object
The Test Explorer
The BookControllerTests class
The AdminBookControllerTests class
The CartTests class
How to register and use tag helpers
How tag helpers compare to HTML helpers
How to create a custom tag helper
How to create a tag helper for a non-standard HTML element
How to use extension methods with tag helpers
How to control the scope of a tag helper
How to use a tag helper to add elements
How to use properties with a tag helper
How to work with the model property that an element is bound to
How to use dependency injection with a tag helper
How to create a conditional tag helper
How to generate URLs in a tag helper
How to create and use a partial view
How to pass data to a partial view
How to create and use a view component
How to pass data to a view component
How view components can simplify an app
The Book Catalog page
The updated ActiveNavbar tag helper
The layout
The Book/List view
Three types of authentication
How individual user account authentication works
An introduction to ASP.NET Identity
How to restrict access to controllers and actions
How to add Identity classes to the DB context
How to add Identity tables to the database
How to configure the middleware for Identity
How to add Log In/Out buttons and links to the layout
How to start the Account controller
The Register view model
The Account/Register view
The Register() action method for POST requests
The LogOut() action method for POST requests
The Login view model
The Account/Login view
The LogIn() action method for POST requests
Properties and methods for working with roles
The User entity and view model
The User controller and its Index() action method
The User/Index view
Other action methods of the User controller
The code that restricts access
How to seed roles and users
How to change a user’s password
How to add more user registration fields
How to install VS Code
How to open and close a project folder
How to view and edit files
How to run and stop a project
How to create the database for a project
A summary of .NET EF Core commands
How to create a new project
How to add NuGet packages to a project
How to work with the folders and files
How to install and manage client-side libraries
How to set a breakpoint
How to work in break mode
How to install Visual Studio
How to install the source code for this book
How to create the databases for this book
How to install Visual Studio
How to install the source code for this book
Problems and solutions when using macOS with this book
How to install and use DB Browser for SQLite
This chapter gives you the background you need to start writing ASP.NET Core MVC apps. It describes how web apps work, how ASP.NET Core MVC apps work, and what software you need for developing these apps.
This chapter teaches you how to use Visual Studio to code and test a single-page ASP.NET Core MVC web app that calculates the future value of a series of investments. That includes how to work with controllers, model binding, Razor views, and data validation.
Chapter 1 PDF Download Now
Chapter 2 PDF Download Now
This download includes:
The appendix in the book describes how to install and use these files.
Exe file for Windows (65.1Mb) Download Now
Zip file for Windows (64.9Mb) Download Now
Zip file for macOS (67.7Mb) Download Now
To view the "Frequently Asked Questions" for this book in a PDF, just click on this link: View the questions
Then, if you have any questions that aren't answered here, please email us. Thanks!
To view the corrections for this book in a PDF, just click on this link: View the corrections
Then, if you find any other errors, please email us so we can correct them in the next printing of the book. Thank you!
For orders and customer service:
1-800-221-5528
Weekdays, 8 to 4 Pacific Time
If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.