Files
marechai/Marechai.MobyGames/MarechaiContextFactory.cs
Natalia Portillo 681fe830f2 Add MobyGames import services and country matching functionality
- Implemented CountryMatcher for matching country names with aliases.
- Created GameAssembler to parse and assemble game data from MobyGames.
- Developed ImportService to handle the import process of games, including validation and state management.
- Added PersonMatcher and PlatformMatcher for matching and creating persons and platforms.
- Introduced SoundexHelper for phonetic matching of names.
- Built SourceDatabaseService for database interactions with MobyGames data.
- Established StateService for tracking import states and managing game processing statuses.
- Updated solution file to include MobyGames project.
2026-04-27 21:37:45 +01:00

19 lines
603 B
C#

using System.Threading;
using System.Threading.Tasks;
using Marechai.Database.Models;
using Microsoft.EntityFrameworkCore;
namespace Marechai.MobyGames;
public class MarechaiContextFactory : IDbContextFactory<MarechaiContext>
{
readonly DbContextOptions<MarechaiContext> _options;
public MarechaiContextFactory(DbContextOptions<MarechaiContext> options) => _options = options;
public MarechaiContext CreateDbContext() => new(_options);
public Task<MarechaiContext> CreateDbContextAsync(CancellationToken cancellationToken = default) =>
Task.FromResult(CreateDbContext());
}