DevoWeek #16

Functions instead of interfaces, Functors and monads in pictures, "The art of destroying software" talk…

Resolving after dependency injection

Let's say you have service that is responsible for creating new tenant databases. The service uses several strategies for creating database instances of different RDBMS types. public interface ITenantDatabaseCreator { void Create(/* Some args */); } public class MssqlTenantDatabaseCreator : ITenantDatabaseCreator { // MS SQL implementation } public class OracleTenantDatabaseCreator : ITenantDatabaseCreator { // Oracle implementation } We're good programmers so…

Autofac, API and LifetimeScopes

Once again I came across problem of registering services in Autofac container in API oriented project. Basically it's registering business-logic-services to be resolved as instance per (API) request. It works... until you'd like to resolve your service in Integration tests or Hangfire/Quartz job. The whole problem is discussed on…