44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
// <copyright file="LocalCommentaireRepository.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
using Webzine.Entity;
|
|
using Webzine.Repository.Contracts;
|
|
|
|
namespace Webzine.Repository
|
|
{
|
|
public class LocalCommentaireRepository : ICommentaireRepository
|
|
{
|
|
private readonly InMemoryDataStore dataStore;
|
|
|
|
public LocalCommentaireRepository(InMemoryDataStore dataStore)
|
|
{
|
|
this.dataStore = dataStore;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public void Add(Commentaire commentaire)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public void Delete(Commentaire commentaire)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public Commentaire Find(int id)
|
|
{
|
|
return this.dataStore.Commentaires.Find(c => c.IdCommentaire == id);
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public IEnumerable<Commentaire> FindAll()
|
|
{
|
|
return this.dataStore.Commentaires.ToList();
|
|
}
|
|
}
|
|
}
|