public static IServiceCollection GetDependencies(IServiceCollection services, IConfiguration configuration) { services = DataDependencyMapper.GetDependencies(services, configuration); services.AddScoped <IUserService, UserService>(); services.AddScoped <IEventService, EventService>(); services.AddScoped <IEventTypeService, EventTypeService>(); services.AddScoped <IMessageService, MessageService>(); services.AddScoped <IUserStore <UserDTO>, UserStore>(); return(services); }
public static IServiceCollection GetDependencies(IServiceCollection services, IConfiguration configuration) { services = DataDependencyMapper.GetDependencies(services, configuration); services.AddScoped <IEventService, EventService>(); services.AddScoped <IGuestService, GuestService>(); services.AddScoped <ILocationService, LocationService>(); services.AddScoped <IStaffService, StaffService>(); services.AddScoped <IUnitOfWork, UnitOfWork>(); return(services); }
public static void RegisterDependencies(IServiceCollection serviceCollection, IConfiguration configuration) { DataDependencyMapper.RegisterDependencies(serviceCollection, configuration); serviceCollection.AddScoped <IUserService, UserService>(); //->https://stackoverflow.com/questions/38138100/addtransient-addscoped-and-addsingleton-services-differences }
public static void RegisterDependencies(IServiceCollection serviceCollection) { DataDependencyMapper.RegisterDependencies(serviceCollection); serviceCollection.AddScoped <ISubredditsService, SubredditsService>(); //->https://stackoverflow.com/questions/38138100/addtransient-addscoped-and-addsingleton-services-differences serviceCollection.AddScoped <IDocumentsRankingService, DocumentsRankingService>(); //->https://stackoverflow.com/questions/38138100/addtransient-addscoped-and-addsingleton-services-differences }