Created
December 11, 2020 15:59
-
-
Save NickPolyder/e52f6e603e63df0bd16c02da1cbeb0da to your computer and use it in GitHub Desktop.
Making A ServiceCollection Extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Microsoft.Extensions.DependencyInjection; | |
public static class ExampleExtensions | |
{ | |
public static IServiceCollection AddExampleService(this IServiceCollection services) | |
{ | |
services.AddSingleton<IExampleService, ExampleService>(); | |
return services; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment