Skip to content

Commit 3581676

Browse files
committed
save
1 parent 6b06879 commit 3581676

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

EntityFrameworkExtras.Shared/StoredProcedureParserHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ public Type GetCollectionType(Type type)
4848
{
4949
if (type.IsInterface && type.GetGenericTypeDefinition() == typeof(IEnumerable<>))
5050
{
51-
returnType = type.GetGenericArguments().FirstOrDefault();
51+
returnType = type.GetGenericArguments()?.FirstOrDefault();
5252
}
5353
else
5454
{
55-
returnType = type.GetInterfaces()
56-
.Where(x => x.IsGenericType)
57-
.FirstOrDefault(x => x.GetGenericTypeDefinition() == typeof(IEnumerable<>))?.GetGenericArguments()?.FirstOrDefault();
55+
returnType = type.GetInterfaces()?
56+
.Where(x => x.IsGenericType)?
57+
.FirstOrDefault(x => x.GetGenericTypeDefinition() == typeof(IEnumerable<>))?.GetGenericArguments()?.FirstOrDefault();
5858
}
5959
}
6060

0 commit comments

Comments
 (0)