refactor(Infrastructure): update Executor, Migrations and Repositories to be compiled only in .NET
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using DigitalData.Core.Infrastructure;
|
||||
#if NET
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DigitalData.Core.Exceptions;
|
||||
using EnvelopeGenerator.Domain;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class EnvelopeReceiverRepository : CRUDRepository<EnvelopeReceiver, (int
|
||||
private IQueryable<EnvelopeReceiver> ReadById(int envelopeId, int receiverId, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true)
|
||||
{
|
||||
var query = readOnly ? _dbSet.AsNoTracking() : _dbSet;
|
||||
|
||||
|
||||
if (withEnvelope)
|
||||
query = query
|
||||
.Include(er => er.Envelope).ThenInclude(e => e!.Documents!).ThenInclude(d => d.Elements!.Where(e => e.Receiver!.Id == receiverId))
|
||||
@@ -108,7 +108,7 @@ public class EnvelopeReceiverRepository : CRUDRepository<EnvelopeReceiver, (int
|
||||
|
||||
var query = _dbSet.AsNoTracking();
|
||||
|
||||
if(email is not null)
|
||||
if (email is not null)
|
||||
query = query.Where(er => er.Receiver!.EmailAddress == email);
|
||||
|
||||
if (id is not null)
|
||||
@@ -118,5 +118,6 @@ public class EnvelopeReceiverRepository : CRUDRepository<EnvelopeReceiver, (int
|
||||
query = query.Where(er => er.Receiver!.Signature == signature);
|
||||
|
||||
return await query.OrderBy(er => er.EnvelopeId).LastOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user