Code cleanup

This commit is contained in:
2022-01-22 17:13:38 +03:00
parent 401f9fb529
commit ff63d6dfaa
13 changed files with 232 additions and 138 deletions
+2 -2
View File
@@ -290,7 +290,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
.Where(subscriber => subscriber.Feed == feed && subscriber.SubscriberId == chat.Id)
.Select(subscriber => subscriber.SubscriptionId).FirstAsync();
_dbContext.MarkAsDeleted(_dbContext.Find<Subscriber>(subId));
_dbContext.Subscriptions.Remove(_dbContext.Find<Subscriber>(subId));
}
else
{
@@ -298,7 +298,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
subscription.Feed = feed;
subscription.SubscriberId = chat.Id;
_dbContext.MarkAsCreated(subscription);
_dbContext.Subscriptions.Add(subscription);
}
await _dbContext.SaveChangesAsync();
+1 -1
View File
@@ -109,7 +109,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Service
await ProcessFeed(feed, dbContext);
feed.UpdatedAt = DateTime.Now;
dbContext.MarkAsModified(feed);
dbContext.Update(feed);
}
await dbContext.SaveChangesAsync();