Skip to content

Commit

Permalink
Fixes for #789 and #791.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikependon committed Mar 19, 2021
1 parent f7c473c commit ad5b97e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RepoDb.Core/RepoDb/Extensions/TypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public static bool IsAnonymousType(this Type type) =>
/// <param name="type">The current type.</param>
/// <returns>Returns true if the current type is of type <see cref="IDictionary{TKey, TValue}"/> (with string/object key-value-pair).</returns>
public static bool IsDictionaryStringObject(this Type type) =>
type == StaticType.IDictionaryStringObject || type == StaticType.ExpandoObject;
type == StaticType.IDictionaryStringObject ||
type == StaticType.DictionaryStringObject || type == StaticType.ExpandoObject;

/// <summary>
/// Checks whether the current type is wrapped within a <see cref="Nullable{T}"/> object.
Expand Down Expand Up @@ -103,7 +104,7 @@ internal static IEnumerable<Field> AsFields(this Type type) =>
/// <param name="type">The current type.</param>
/// <returns>The list of the enumerable <see cref="ClassProperty"/> objects.</returns>
internal static IEnumerable<ClassProperty> GetEnumerableClassProperties(this Type type) =>
PropertyCache.Get(type).Where(classProperty =>
PropertyCache.Get(type).Where(classProperty =>
{
var propType = classProperty.PropertyInfo.PropertyType;
return
Expand Down
5 changes: 5 additions & 0 deletions RepoDb.Core/RepoDb/StaticType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ internal static class StaticType
/// </summary>
public static Type Dictionary => typeof(Dictionary<,>);

/// <summary>
/// Gets a type of the <see cref="Dictionary{TKey, TValue}"/> (with string/object key-value-pair) .NET CLR type.
/// </summary>
public static Type DictionaryStringObject => typeof(Dictionary<string, object>);

/// <summary>
/// Gets a type of the <see cref="double"/> .NET CLR type.
/// </summary>
Expand Down

0 comments on commit ad5b97e

Please sign in to comment.