This repository has been archived on 2025-01-22. You can view files and clone it, but cannot push or open issues or pull requests.
SCHALE.GameServer/SCHALE.Common/Database/ServicesExtesions.cs

17 lines
451 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace SCHALE.Common.Database
{
public static class ServicesExtesions
{
public static void AddMongoDBProvider(this IServiceCollection services, string connectionString)
{
services.AddDbContext<SCHALEContext>(opt =>
{
opt.UseMongoDB(connectionString, "SCHALE");
});
}
}
}