hn-20-2/Infrastructure/Repositories/Memory/CommentRepository.cs

21 lines
405 B
C#

using System.Collections.Generic;
using System.Linq;
using Domain;
namespace Infrastructure.Repositories.Memory
{
public class CommentRepository : ICommentRepository
{
public List<Comment> Comments { get; }
public CommentRepository(params Comment[] comments)
{
Comments = comments.ToList();
}
public void Add(Comment comment)
{
Comments.Add(comment);
}
}
}