diff --git a/Pulsar/Program.cs b/Pulsar/Program.cs index cc768c2..f004158 100644 --- a/Pulsar/Program.cs +++ b/Pulsar/Program.cs @@ -4,7 +4,12 @@ using Pulsar.Features; var builder = WebApplication.CreateBuilder(args); -builder.Services.AddLamar(); +builder.Host.UseLamar((_, registry) => registry.Scan(scan => +{ + scan.AssemblyContainingType(); + scan.WithDefaultConventions(); + scan.LookForRegistries(); +})); builder.Services.AddControllersWithViews(); builder.Services.AddCors(options => { diff --git a/Pulsar/Pulsar.csproj b/Pulsar/Pulsar.csproj index 8df4c3e..09d53a2 100644 --- a/Pulsar/Pulsar.csproj +++ b/Pulsar/Pulsar.csproj @@ -21,7 +21,6 @@ - diff --git a/Pulsar/PulsarServiceRegistry.cs b/Pulsar/PulsarServiceRegistry.cs new file mode 100644 index 0000000..e4cdacc --- /dev/null +++ b/Pulsar/PulsarServiceRegistry.cs @@ -0,0 +1,13 @@ +using Lamar; +using Pulsar.Features; + +namespace Pulsar; + +public class PulsarServiceRegistry : ServiceRegistry +{ + public PulsarServiceRegistry() + { + For().Use(); + For().Use(); + } +} \ No newline at end of file