More fixed for EF core

This commit is contained in:
Jamie Rees 2020-02-25 21:15:31 +00:00
parent 4f9579e7bf
commit 6c3ae89ca0
8 changed files with 16 additions and 14 deletions

View file

@ -136,7 +136,7 @@ namespace Ombi.Core.Engine
{
var user = await GetUser();
var existingSub = await _subscriptionRepository.GetAll().FirstOrDefaultAsync(x =>
x.UserId.Equals(user.Id) && x.RequestId == requestId && x.RequestType == type);
x.UserId == user.Id && x.RequestId == requestId && x.RequestType == type);
if (existingSub != null)
{
return;
@ -155,7 +155,7 @@ namespace Ombi.Core.Engine
{
var user = await GetUser();
var existingSub = await _subscriptionRepository.GetAll().FirstOrDefaultAsync(x =>
x.UserId.Equals(user.Id) && x.RequestId == requestId && x.RequestType == type);
x.UserId == user.Id && x.RequestId == requestId && x.RequestType == type);
if (existingSub != null)
{
await _subscriptionRepository.Delete(existingSub);