Skip to content

Commit

Permalink
optimized query
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimChegulov committed Feb 1, 2024
1 parent c1d7608 commit 8ee3fdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/ASC.Api.Core/Security/InvitationLinkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,6 @@ static file class Queries
public static readonly Func<MessagesContext, int, string, string, Task<DbAuditEvent>> AuditEventsAsync =
EF.CompileAsyncQuery(
(MessagesContext ctx, int tenantId, string target, string description) =>
ctx.AuditEvents.FirstOrDefault(a => a.TenantId == tenantId && a.Target == target && a.DescriptionRaw == description));
ctx.AuditEvents.FirstOrDefault(a =>
a.TenantId == tenantId && a.Action == (int)MessageAction.RoomInviteLinkUsed && a.Target == target && a.DescriptionRaw == description));
}

0 comments on commit 8ee3fdb

Please sign in to comment.