src/Shared/EntityFramework/Infrastructure/DependencyResolution/IDbDependencyResolverExtensions.cs
// <summary>
// This is a helper method that can be used in an <see cref="IDbDependencyResolver.GetServices"/> implementation 
// such that an empty list is returned if the <see cref="IDbDependencyResolver.GetService"/> returns null
// and a list of one element is returned if GetService returns one element.
// </summary>
// <param name="resolver">The resolver.</param>
// <param name="type"> The contract type to resolve. </param>
// <param name="key"> The key of the dependency to resolve. </param>
// <returns>A list of either zero or one elements.</returns>
This is a helper method that can be used in an  implementation
such that an empty list is returned if the  returns null
and a list of one element is returned if GetService returns one element.
This is a helper method that can be used in an implementation such that an empty list is returned if the returns null and a list of one element is returned if GetService returns one element .
internal static IEnumerable<object> GetServiceAsServices(this IDbDependencyResolver resolver, Type type, object key)
        {
            DebugCheck.NotNull(resolver);
            var service = resolver.GetService(type, key);
            return service == null ? Enumerable.Empty<object>() : new[] { service };
        }
internal static IEnumerable < object > GetServiceAsServices ( this IDbDependencyResolver resolver , Type type , object key ) { DebugCheck . NotNull ( resolver ) ; var service = resolver . GetService ( type , key ) ; return service == null ? Enumerable . Empty < object > ( ) : new [ ] { service } ; }
This is a helper method that can be used in an  implementation
such that an empty list is returned if the  returns null
and a list of one element is returned if GetService returns one element.
This is a helper method that can be used in an implementation such that an empty list is returned if the returns null and a list of one element is returned if GetService returns one element .
A list of either zero or one elements.
A list of either zero or one elements .
IDbDependencyResolver
this
type
Type
The contract type to resolve.
The contract type to resolve .
key
object
The key of the dependency to resolve.
The key of the dependency to resolve .
resolver
None