public void ListLogEntityAsLogEntityModel() { var logEntityModel = logEntityReadRepository.Query(new QueryOptions <LogEntity> { Where = _ => true }) .ToList() .Select(log => new LogEntityModel(log)) .ToList(); logEntityModel.ForEach(log => { log.EntityType.FullName.Should().Be(log.EntityFullName); Guid.TryParse(log.TransactionId, out Guid _).Should().BeTrue(); log.OriginalValues.GetType().Should().Be(log.EntityType); if (log.LogActionType == LogActionType.Insert) { log.ChangedValuesAsString.Should().BeNullOrEmpty(); log.ModifiedEntityProperties.Any().Should().BeFalse(); } else if (log.LogActionType == LogActionType.Update) { log.ChangedValuesAsString.Should().NotBeNullOrEmpty(); log.ModifiedEntityProperties.Any().Should().BeTrue(); } else if (log.LogActionType == LogActionType.Delete) { log.ChangedValuesAsString.Should().BeNullOrEmpty(); log.ModifiedEntityProperties.Any().Should().BeFalse(); } }); }
public override IEnumerable <T> Query <T>(Dictionary <string, object> queryParameters) { return(ReadRepository.Query <T>(queryParameters)); }
public override IEnumerable <T> Query <T>(Func <T, bool> query) { return(ReadRepository.Query <T>(query)); }
public override IEnumerable <T> Query <T>(dynamic query) { return(ReadRepository.Query <T>(query)); }
public override IEnumerable <T> Query <T>(QueryFilter query) { return(ReadRepository.Query <T>(query)); }
public override IEnumerable <object> Query(string propertyName, object propertyValue) { return(ReadRepository.Query(propertyName, propertyValue)); }
public override IEnumerable <object> Query(Type type, Func <object, bool> predicate) { return(ReadRepository.Query(type, predicate)); }
public override IEnumerable <object> Query(Type type, QueryFilter query) { return(ReadRepository.Query(type, query)); }
public override IEnumerable <object> Query(Type type, Dictionary <string, object> queryParameters) { return(ReadRepository.Query(type, queryParameters)); }
public override IEnumerable <object> Query(dynamic query) { return(ReadRepository.Query(query)); }