Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning ASP.NET Core 2.0

You're reading from   Learning ASP.NET Core 2.0 Build modern web apps with ASP.NET Core 2.0, MVC, and EF Core 2

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781788476638
Length 516 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Michel Bruchet Michel Bruchet
Author Profile Icon Michel Bruchet
Michel Bruchet
Jason De Oliveira Jason De Oliveira
Author Profile Icon Jason De Oliveira
Jason De Oliveira
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. What is ASP.NET Core 2.0? FREE CHAPTER 2. Setting Up the Environment 3. Creating a Continuous Integration Pipeline in VSTS 4. Basic Concepts of ASP.NET Core 2.0 - Part 1 5. Basic Concepts of ASP.NET Core 2.0 - Part 2 6. Creating MVC Applications 7. Creating Web API Applications 8. Accessing Data using Entity Framework Core 2 9. Securing ASP.NET Core 2.0 Applications 10. Hosting and Deploying ASP.NET Core 2.0 Applications 11. Managing and Supervising ASP.NET Core 2.0 Applications

Configuring your applications and services


In the previous sections, you have further advanced by adding missing components to the user registration process and even localizing parts of the Tic-Tac-Toe application. However, you have always simulated the email confirmation by setting the user confirmation programmatically in code. In this section, we will modify this part to really send emails to newly-registered users and make everything fully configurable.

First, you are going to add a new Email Service, which will be used to send emails to users who have freshly registered on the website:

  1. Within the Services folder, add a new service called EmailService, and implement a default SendEmail method (we will update it later):
        public class EmailService 
        { 
          public Task SendEmail(string emailTo, string subject,
           string message) 
          { 
            return Task.CompletedTask; 
          } 
        } 
  1. Extract the IEmailService interface:

  1. Add the new Email Service...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime