1
0
mirror of https://github.com/XFox111/MuiCharts.git synced 2026-04-22 06:51:05 +03:00

Added ASP.NET backend with SQLite

This commit is contained in:
2024-02-22 11:06:44 +00:00
parent d96b683a90
commit be8cc7ded4
39 changed files with 2109 additions and 0 deletions
@@ -0,0 +1,25 @@
using Microsoft.Extensions.DependencyInjection;
using MuiCharts.Domain.Repositories;
using MuiCharts.Infrastructure.Repositories;
namespace MuiCharts.Infrastructure;
/// <summary>
/// Provides extension methods for configuring infrastructure services.
/// </summary>
public static class InfrastructrureExtensions
{
/// <summary>
/// Adds infrastructure services to the specified <see cref="IServiceCollection"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to add the services to.</param>
/// <returns>The modified <see cref="IServiceCollection"/>.</returns>
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddDbContext<DataContext>();
services.AddScoped<IPointRepository, PointRepository>();
services.AddScoped<ITrackRepository, TrackRepository>();
return services;
}
}