SurveyVista/Services/Implemnetation/QuestionRepository.cs
2024-03-10 13:46:37 +01:00

40 lines
890 B
C#

using Data;
using Model;
using Services.Interaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Services.Implemnetation
{
public class QuestionRepository : IQuestionRepository
{
private readonly SurveyContext _context;
public QuestionRepository(SurveyContext context)
{
_context = context;
}
public void Add(Question question)
{
_context.Questions.Add(question);
}
public async Task commitAsync()
{
await _context.SaveChangesAsync();
}
public List<Question> GetAllQuestions()
{
throw new NotImplementedException();
}
public Question GetQuestionById(int id)
{
throw new NotImplementedException();
}
}
}