InkForge/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs
2024-02-10 10:38:28 +01:00

28 lines
734 B
C#

using InkForge.Common.Controllers;
using InkForge.Common.Data;
using InkForge.Common.ViewModels;
using InkForge.Common.ViewModels.Landing;
using InkForge.Common.Views;
using InkForge.Data;
using ReactiveUI;
namespace Microsoft.Extensions.DependencyInjection;
public static class InkForgeServiceCollections
{
public static IServiceCollection AddInkForge(this IServiceCollection services)
{
services.AddHttpClient();
services.AddDbContextFactory<NoteDbContext, NoteDbContextFactory>();
services.AddSingleton<LandingViewModel>();
services.AddSingleton<LandingViewModelFactory>();
services.AddSingleton<WorkspaceController>();
services.AddTransient<IViewFor<LandingViewModel>, LandingView>();
return services;
}
}