Questions tagged [lamar]

Lamar is a new OSS library written in C# that is a new IoC container meant to replace the venerable, but increasingly creaky StructureMap library.

Lamar was purposely designed and built to maximize compliance with the underlying IoC behavior assumed by ASP.Net Core. To reduce friction in Lamar usage, Lamar directly implements the core ASP.Net Core abstractions for dependency injection.

36 questions
0
votes
1 answer

How to debug and find source of the error "NullReferenceException" when bootstrapping C# services using Lamar?

We have some services in our project which we recently ported to .NetCore 3.0. Additionally, since StructureMap is to be sunset, we removed all references and are moving to Lamar since it was the fastest to migrate to. When bootstrapping, one of the…
0
votes
1 answer

Why won't Lamar inject type of IServiceScopeFactory in ASP.NET Core?

I am trying to implement a health check in an aspnetcore2.2 project which asserts that my Lamar container configuration is valid via IContainer.AssertConfigurationIsValid (essentially that it can construct all dependencies). A couple of services…
Lars Baunwall
  • 75
  • 1
  • 4
0
votes
1 answer

Lamar causes 500.30 error when using ServiceRegistry

I am using Lamar as the DI for .Net Core (2.2) Web API. Program.cs public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static…
Juho Rutila
  • 2,316
  • 1
  • 25
  • 40
0
votes
1 answer

Why after referencing nuget, my packed tool size increased much more comparing with size info provided in nuget.org?

Why is there such huge difference between what I see in nuget.org under package download size and size increase after packing with given nuget? For example: In nuget.org I see that download size of Lamar package is only 140.56 KB. But size of my…
joostas
  • 485
  • 5
  • 10
0
votes
1 answer

Scaffolding Entity Framework Controllers with Lamar

I have Lamar set up in my .NET Core 2 project: public class Program { public static void Main(string[] args) { IWebHost webhost = CreateWebHostBuilder(args).Build(); …
BM-
  • 616
  • 5
  • 15
0
votes
1 answer

Lamar IoC Container Setup Issues

I have been attempting to get Lamar working for our dependency injection, but my lack of experience doing so has been causing me some grief. I have a simple dummy controller: [Route("[controller]")] public class TestController : Controller { …
1 2
3