Testing more garbage encryption

This commit is contained in:
gamer147
2024-09-07 22:14:24 -04:00
parent f7657c2ec4
commit 7e4bce9ac5
32 changed files with 783 additions and 51 deletions

View File

@@ -0,0 +1,8 @@
using SVSim.Database.Enums;
namespace SVSim.Database.Repositories.Viewer;
public interface IViewerRepository
{
Task<Models.Viewer?> GetViewerBySocialConnection(SocialAccountType accountType, ulong socialId);
}

View File

@@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
using SVSim.Database.Enums;
using SVSim.Database.Models;
namespace SVSim.Database.Repositories.Viewer;
public class ViewerRepository : IViewerRepository
{
protected readonly SVSimDbContext _dbContext;
public ViewerRepository(SVSimDbContext dbContext)
{
_dbContext = dbContext;
}
public async Task<Models.Viewer?> GetViewerBySocialConnection(SocialAccountType accountType, ulong socialId)
{
return _dbContext.Set<SocialAccountConnection>()
.AsNoTracking()
.Include(sac => sac.Viewer)
.FirstOrDefault(sac => sac.AccountType == accountType && sac.AccountId == socialId)
?.Viewer;
}
}