InkForge/app/InkForge.Common/Microsoft/Extensions/DependencyInjection/InkForgeServiceCollection.cs

26 lines
595 B
C#
Raw Normal View History

2024-02-09 01:23:38 +01:00
using InkForge.Common.Controllers;
using InkForge.Common.Data;
2024-02-09 13:02:20 +01:00
using InkForge.Common.ViewModels;
using InkForge.Common.Views;
2024-02-09 01:23:38 +01:00
using InkForge.Data;
2024-02-09 13:02:20 +01:00
using ReactiveUI;
2024-02-09 01:23:38 +01:00
namespace Microsoft.Extensions.DependencyInjection;
public static class InkForgeServiceCollections
{
public static IServiceCollection AddInkForge(this IServiceCollection services)
{
services.AddHttpClient();
services.AddDbContextFactory<NoteDbContext, NoteDbContextFactory>();
services.AddSingleton<WorkspaceController>();
2024-02-09 13:02:20 +01:00
services.AddTransient<IViewFor<LandingViewModel>, LandingView>();
2024-02-09 01:23:38 +01:00
return services;
}
}