completed SurveyRepository.cs

This commit is contained in:
Вячеслав 2025-03-14 23:07:06 +05:00
parent 7d06084dfb
commit 960a6ce191
6 changed files with 27 additions and 21 deletions

View file

@ -1,8 +1,10 @@
using SurveyLib.Core.Models;
namespace SurveyLib.Core.Repositories;
public interface IGenericRepository<T> where T : class
{
Task<T>? GetByIdAsync(int id);
Task<T?> GetByIdAsync(int id);
Task<IEnumerable<T>> GetAllAsync();
Task AddAsync(T entity);
Task UpdateAsync(T entity);

View file

@ -6,5 +6,5 @@ public interface ISurveyRepository : IGenericRepository<Survey>
{
Task<Survey?> GetWithQuestionsAsync(int surveyId);
Task<Survey?> GetWithCompletionsAsync(int surveyId);
Task<Survey?> FindByTitleAsync(string title);
Task<IEnumerable<Survey>> FindByTitleAsync(string title);
}