fix: inherit EF entities from Entity base class
- TemplateEntity, ProviderEntity, ProviderUsageEntity now inherit Entity (from DAL.Abstract) - Removes duplicated Id, Created, Updated properties from each entity Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -45,9 +45,13 @@ internal abstract class NotificationEfRepository<TEntity>
|
||||
await DbContext.SaveChangesAsync(ct);
|
||||
}
|
||||
|
||||
protected Task<bool> ExistsAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken ct = default) =>
|
||||
DbSet.AnyAsync(predicate, ct);
|
||||
protected Task<bool> ExistsAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken ct = default)
|
||||
{
|
||||
return DbSet.AnyAsync(predicate, ct);
|
||||
}
|
||||
|
||||
protected Task SaveAsync(CancellationToken ct = default) =>
|
||||
DbContext.SaveChangesAsync(ct);
|
||||
}
|
||||
protected Task SaveAsync(CancellationToken ct = default)
|
||||
{
|
||||
return DbContext.SaveChangesAsync(ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user