public static void Update(this PrivateBookListItem item, Dictionary <string, object> source, BookItemStatus newStatus) { var newReadingTime = ReadingTimeCalculator.Calculate(item.ReadingTimeInSeconds, item.Status, item.LastStatusUpdateDate, newStatus); source.Add(nameof(PrivateBookListItem.ReadingTimeInSeconds), newReadingTime); ObjectUpdater <PrivateBookListItem> .Update(item, source); }
public static void Update <TEntity>(this TEntity entity, Dictionary <string, object> source) where TEntity : Entity { ObjectUpdater <TEntity> .Update(entity, source); }