blob: 7284464f73acc3f2e283c497e0e1fe5d33c088a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using System.Threading.Tasks;
using DevHive.Data.Interfaces;
using DevHive.Data.Models;
using Microsoft.EntityFrameworkCore;
namespace DevHive.Data.Repositories
{
public class ProfilePictureRepository : BaseRepository<ProfilePicture>, IProfilePictureRepository
{
private readonly DevHiveContext _context;
public ProfilePictureRepository(DevHiveContext context)
: base(context)
{
this._context = context;
}
public async Task<ProfilePicture> GetByURLAsync(string picUrl)
{
return await this._context
.ProfilePicture
.FirstOrDefaultAsync(x => x.PictureURL == picUrl);
}
}
}
|