mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
- 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.
19 lines
603 B
C#
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());
|
|
}
|