29 lines
585 B
C#
29 lines
585 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using HN.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace HN.Infrastructure
|
|
{
|
|
public sealed class LinkRepository : Repository<Link>, ILinkRepository
|
|
{
|
|
public LinkRepository(HNDbContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
public async Task AddAsync(Link link)
|
|
{
|
|
await base.AddAsync(link);
|
|
}
|
|
|
|
public Task<Link> GetByIdAsync(Guid id)
|
|
{
|
|
return Entries.SingleOrDefaultAsync(o => o.Id == id);
|
|
}
|
|
|
|
public async Task UpdateAsync(Link link)
|
|
{
|
|
await base.UpdateAsync(link);
|
|
}
|
|
}
|
|
} |