diff --git a/SurveyLib.Infrastructure.EFCore/Data/SurveyDbContext.cs b/SurveyLib.Infrastructure.EFCore/Data/SurveyDbContext.cs new file mode 100644 index 0000000..5a287c0 --- /dev/null +++ b/SurveyLib.Infrastructure.EFCore/Data/SurveyDbContext.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore; +using SurveyLib.Core.Models; + +namespace SurveyLib.Infrastructure.EFCore.Data; + +public class SurveyDbContext : DbContext +{ + public DbSet Surveys { get; set; } + public DbSet Questions { get; set; } + public DbSet Completions { get; set; } + public DbSet Answers { get; set; } + + public SurveyDbContext(DbContextOptions options) : base(options) + { + + } +} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs index d71e0a7..a1d6436 100644 --- a/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs +++ b/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs @@ -7,9 +7,9 @@ namespace SurveyLib.Infrastructure.EFCore.Repositories; public class AnswerRepository : IAnswerRepository { - private readonly DataContext _context; + private readonly SurveyDbContext _context; - public AnswerRepository(DataContext context) + public AnswerRepository(SurveyDbContext context) { _context = context; } diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs index 9442973..30e6164 100644 --- a/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs +++ b/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs @@ -7,9 +7,9 @@ namespace SurveyLib.Infrastructure.EFCore.Repositories; public class CompletionRepository : ICompletionRepository { - private readonly DataContext _context; + private readonly SurveyDbContext _context; - public CompletionRepository(DataContext context) + public CompletionRepository(SurveyDbContext context) { _context = context; } diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs index 8145f97..e107973 100644 --- a/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs +++ b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs @@ -7,9 +7,9 @@ namespace SurveyLib.Infrastructure.EFCore.Repositories; public class QuestionRepository : IQuestionRepository { - private readonly DataContext _context; + private readonly SurveyDbContext _context; - public QuestionRepository(DataContext context) + public QuestionRepository(SurveyDbContext context) { _context = context; } diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs index afe6ca8..2890053 100644 --- a/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs +++ b/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs @@ -7,9 +7,9 @@ namespace SurveyLib.Infrastructure.EFCore.Repositories; public class SurveyRepository : ISurveyRepository { - private readonly DataContext _context; + private readonly SurveyDbContext _context; - public SurveyRepository(DataContext context) + public SurveyRepository(SurveyDbContext context) { _context = context; }