completed SurveyRepository.cs
This commit is contained in:
parent
7d06084dfb
commit
960a6ce191
6 changed files with 27 additions and 21 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue