mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
increase speed of mysql when searching posts
This commit is contained in:
@@ -61,11 +61,15 @@ internal static class RichSiteSummaryRepositoryExtension
|
||||
await repository.ForFetching(period, 25);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Post
|
||||
|
||||
[Obsolete("Use ByFeedAndUrlHash()")]
|
||||
public static async Task<Post> ByFeedAndUrl(this DbSet<Post> repository, string url, Feed feed = null) =>
|
||||
await repository.FirstOrDefaultAsync(post => post.Url == url && (feed == null || post.Feed == feed));
|
||||
|
||||
public static async Task<Post> ByFeedAndUrlHash(this DbSet<Post> repository, string urlHash, Feed feed = null) =>
|
||||
await repository.FirstOrDefaultAsync(post => post.UrlHash == urlHash && (feed == null || post.Feed == feed));
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user