add UnitWorkBehavior and some files moving add Docker stuff to prepare heroku deployment rename (Up/Down)vote add sample for msbuild tasks
24 lines
523 B
C#
24 lines
523 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using HN.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace HN.Infrastructure.Repositories
|
|
{
|
|
public sealed class CommentRepository : Repository<Comment>, ICommentRepository
|
|
{
|
|
public CommentRepository(HNDbContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
public Task AddAsync(Comment comment)
|
|
{
|
|
return base.AddAsync(comment);
|
|
}
|
|
|
|
public Task<Comment> GetByIdAsync(Guid id)
|
|
{
|
|
return Entries.SingleOrDefaultAsync(o => o.Id == id);
|
|
}
|
|
}
|
|
} |