diff --git a/Proculite.GpioRest/Program.cs b/Proculite.GpioRest/Program.cs index 098de00..6d84ad7 100644 --- a/Proculite.GpioRest/Program.cs +++ b/Proculite.GpioRest/Program.cs @@ -1,3 +1,5 @@ +using Proculite.GpioRest.Services; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. @@ -6,6 +8,8 @@ builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); builder.Services.AddControllers(); +builder.Services.AddSingleton(); + var app = builder.Build(); app.MapControllers(); diff --git a/Proculite.GpioRest/Services/GpioService.cs b/Proculite.GpioRest/Services/GpioService.cs new file mode 100644 index 0000000..d1c5d80 --- /dev/null +++ b/Proculite.GpioRest/Services/GpioService.cs @@ -0,0 +1,11 @@ +namespace Proculite.GpioRest.Services +{ + public class GpioService + { + public readonly ILogger _logger; + public GpioService(ILogger logger) + { + _logger = logger; + } + } +} \ No newline at end of file