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