示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="discordWebhook"></param>
        /// <returns></returns>
        public async Task DeleteAsync(ScGimpDiscordWebhook discordWebhook)
        {
            using (ScGimpContext db = new ScGimpContext())
            {
                DiscordWebhook dbDiscordWebhook = await
                                                  (
                    from s in db.DiscordWebhooks
                    where
                    s.DiscordWebhookId == discordWebhook.Id
                    select s
                                                  ).FirstOrDefaultAsync();

                if (dbDiscordWebhook != null)
                {
                    dbDiscordWebhook.DeletedAt = DateTimeOffset.Now;

                    await db.SaveChangesAsync();
                }
            }
        }
示例#2
0
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        /// <summary>
        ///
        /// </summary>
        /// <param name="discordWebhook"></param>
        /// <returns></returns>
        public async Task RegisterAsync(ScGimpDiscordWebhook discordWebhook)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new NotImplementedException();
        }
示例#3
0
 public Task RegisterAsync(ScGimpDiscordWebhook discordWebhook)
 {
     throw new NotImplementedException();
 }