Update MvcCoreServiceCollectionExtensions.cs

This commit is contained in:
Daniel Roth 2016-11-17 11:39:00 +01:00 committed by Doug Bunting
parent 8f8bf5af34
commit f32d0f2505
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ namespace Microsoft.Extensions.DependencyInjection
private static T GetServiceFromCollection<T>(IServiceCollection services)
{
return (T)services
.FirstOrDefault(d => d.ServiceType == typeof(T))
.LastOrDefault(d => d.ServiceType == typeof(T))
?.ImplementationInstance;
}