How to do it...

  1. First, let's create an interface named IOperation with a getter on a Guid type, and four interfaces that represent a task for each life cycle available:
  1. We will now implement these interfaces in an Operation class:
  1. In the ConfigurationServices method of the Startup.cs class, we manage the lifetime for each interface:
  1. Now, let's create an OperationService class that we will use in an MVC controller and execute in several ...

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.