Esempio n. 1
0
        public async Task AddAsync(ulong targetId, ulong moderatorId, string action, string reason, DateTime createdAt,
                                   TimeSpan duration)
        {
            var log = new RiftModerationLog
            {
                TargetId    = targetId,
                ModeratorId = moderatorId,
                Action      = action,
                Reason      = reason,
                CreatedAt   = createdAt,
                Duration    = duration
            };

            await using var context = new RiftContext();
            await context.AddAsync(log);

            await context.SaveChangesAsync();
        }