19 lines
384 B
C#
19 lines
384 B
C#
using HackerNet.Domain;
|
|
|
|
namespace HackerNet.Infrastructure.Repositories.EntityFramework;
|
|
|
|
public class EFCommentRepository : ICommentRepository
|
|
{
|
|
private readonly HackerContext _context;
|
|
|
|
public EFCommentRepository(HackerContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public void Add(Comment comment)
|
|
{
|
|
_context.Comments.Add(comment);
|
|
_context.SaveChanges();
|
|
}
|
|
} |