refactor(Infrastructure): update Executor, Migrations and Repositories to be compiled only in .NET

This commit is contained in:
2025-10-01 10:36:57 +02:00
parent 167ea1444b
commit 12063f36de
23 changed files with 2344 additions and 2298 deletions

View File

@@ -1,4 +1,5 @@
using DigitalData.Core.Infrastructure;
#if NET
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
@@ -16,10 +17,10 @@ public class ReceiverRepository : CRUDRepository<Receiver, int, EGDbContext>, IR
{
IQueryable<Receiver> query = _dbSet.AsNoTracking();
if(emailAddress is not null)
if (emailAddress is not null)
query = query.Where(r => r.EmailAddress == emailAddress);
if(signature is not null)
if (signature is not null)
query = query.Where(r => r.Signature == signature);
// envelope receivers are ignored (with '[JsonIgnore]' attribute). The reson to add them is to get the las used receiver name
@@ -34,4 +35,5 @@ public class ReceiverRepository : CRUDRepository<Receiver, int, EGDbContext>, IR
public async Task<Receiver?> ReadByAsync(string? emailAddress = null, string? signature = null) => await ReadBy(emailAddress, signature).FirstOrDefaultAsync();
public async override Task<IEnumerable<Receiver>> ReadAllAsync() => await ReadBy().ToListAsync();
}
}
#endif