From 4e3c3e6149a9f108b8358f5d4d565e7968eee1ef Mon Sep 17 00:00:00 2001 From: shept Date: Fri, 14 Mar 2025 22:41:53 +0500 Subject: [PATCH] added reference to Core added empty implementations of repositories --- .../Repositories/AnswerRepository.cs | 42 +++++++++++++++++ .../Repositories/CompletionRepository.cs | 37 +++++++++++++++ .../Repositories/QuestionRepository.cs | 42 +++++++++++++++++ .../Repositories/SurveyRepository.cs | 47 +++++++++++++++++++ .../SurveyLib.Infrastructure.EFCore.csproj | 5 +- 5 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs create mode 100644 SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs create mode 100644 SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs create mode 100644 SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs new file mode 100644 index 0000000..3906537 --- /dev/null +++ b/SurveyLib.Infrastructure.EFCore/Repositories/AnswerRepository.cs @@ -0,0 +1,42 @@ +using SurveyLib.Core.Models; +using SurveyLib.Core.Repositories; + +namespace SurveyLib.Infrastructure.EFCore.Repositories; + +public class AnswerRepository : IAnswerRepository +{ + public Task? GetByIdAsync(int id) + { + throw new NotImplementedException(); + } + + public Task> GetAllAsync() + { + throw new NotImplementedException(); + } + + public Task AddAsync(Answer entity) + { + throw new NotImplementedException(); + } + + public Task UpdateAsync(Answer entity) + { + throw new NotImplementedException(); + } + + public Task DeleteAsync(Answer entity) + { + throw new NotImplementedException(); + } + + public Task> GetByAttemptIdAsync(int attemptId) + { + throw new NotImplementedException(); + } + + public Task> GetByQuestionIdAsync(int questionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs new file mode 100644 index 0000000..c628977 --- /dev/null +++ b/SurveyLib.Infrastructure.EFCore/Repositories/CompletionRepository.cs @@ -0,0 +1,37 @@ +using SurveyLib.Core.Models; +using SurveyLib.Core.Repositories; + +namespace SurveyLib.Infrastructure.EFCore.Repositories; + +public class CompletionRepository : ICompletionRepository +{ + public Task? GetByIdAsync(int id) + { + throw new NotImplementedException(); + } + + public Task> GetAllAsync() + { + throw new NotImplementedException(); + } + + public Task AddAsync(Completion entity) + { + throw new NotImplementedException(); + } + + public Task UpdateAsync(Completion entity) + { + throw new NotImplementedException(); + } + + public Task DeleteAsync(Completion entity) + { + throw new NotImplementedException(); + } + + public Task> GetBySurveyIdAsync(int surveyId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs new file mode 100644 index 0000000..d193671 --- /dev/null +++ b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs @@ -0,0 +1,42 @@ +using SurveyLib.Core.Models; +using SurveyLib.Core.Repositories; + +namespace SurveyLib.Infrastructure.EFCore.Repositories; + +public class QuestionRepository : IQuestionRepository +{ + public Task? GetByIdAsync(int id) + { + throw new NotImplementedException(); + } + + public Task> GetAllAsync() + { + throw new NotImplementedException(); + } + + public Task AddAsync(QuestionBase entity) + { + throw new NotImplementedException(); + } + + public Task UpdateAsync(QuestionBase entity) + { + throw new NotImplementedException(); + } + + public Task DeleteAsync(QuestionBase entity) + { + throw new NotImplementedException(); + } + + public Task GetWithAnswersAsync(int questionId) + { + throw new NotImplementedException(); + } + + public Task> GetBySurveyIdAsync(int surveyId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs new file mode 100644 index 0000000..67e3295 --- /dev/null +++ b/SurveyLib.Infrastructure.EFCore/Repositories/SurveyRepository.cs @@ -0,0 +1,47 @@ +using SurveyLib.Core.Models; +using SurveyLib.Core.Repositories; + +namespace SurveyLib.Infrastructure.EFCore.Repositories; + +public class SurveyRepository : ISurveyRepository +{ + public Task? GetByIdAsync(int id) + { + throw new NotImplementedException(); + } + + public Task> GetAllAsync() + { + throw new NotImplementedException(); + } + + public Task AddAsync(Survey entity) + { + throw new NotImplementedException(); + } + + public Task UpdateAsync(Survey entity) + { + throw new NotImplementedException(); + } + + public Task DeleteAsync(Survey entity) + { + throw new NotImplementedException(); + } + + public Task GetWithQuestionsAsync(int surveyId) + { + throw new NotImplementedException(); + } + + public Task GetWithCompletionsAsync(int surveyId) + { + throw new NotImplementedException(); + } + + public Task FindByTitleAsync(string title) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/SurveyLib.Infrastructure.EFCore.csproj b/SurveyLib.Infrastructure.EFCore/SurveyLib.Infrastructure.EFCore.csproj index 0123882..1e98149 100644 --- a/SurveyLib.Infrastructure.EFCore/SurveyLib.Infrastructure.EFCore.csproj +++ b/SurveyLib.Infrastructure.EFCore/SurveyLib.Infrastructure.EFCore.csproj @@ -8,11 +8,14 @@ - + + + +