File tree Expand file tree Collapse file tree
Dotnet5.GraphQL3.CrossCutting
Dotnet5.GraphQL3.Services.Abstractions/Models
Dotnet5.GraphQL3.Store.WebAPI Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
32using System . Linq ;
43using System . Reflection ;
4+ using Microsoft . Extensions . DependencyModel ;
55
66namespace Dotnet5 . GraphQL3 . CrossCutting
77{
88 public static class Application
99 {
1010 public static string Prefix { get ; } = Assembly . GetEntryAssembly ( ) ? . FullName ? . Substring ( 0 , 16 ) ;
11- public static IEnumerable < Assembly > Assemblies { get ; } =
12- AppDomain . CurrentDomain . GetAssemblies ( ) . Where ( assembly => assembly . FullName ? . StartsWith ( Prefix ) ?? false ) ;
11+
12+ public static IEnumerable < Assembly > Assemblies { get ; } =
13+ DependencyContext . Default . RuntimeLibraries
14+ . Where ( library => library . Name . Contains ( Prefix ) )
15+ . SelectMany ( library => library . GetDefaultAssemblyNames ( DependencyContext . Default ) )
16+ . Select ( Assembly . Load ) ;
1317 }
1418}
Original file line number Diff line number Diff line change 44 <PackageReference Include =" FluentValidation" Version =" $(FluentValidation_Version)" />
55 <PackageReference Include =" GraphQL" Version =" $(GraphQL_Version)" />
66 <PackageReference Include =" Microsoft.Extensions.DependencyInjection.Abstractions" Version =" $(Microsoft_DependencyInjection_Version)" />
7+ <PackageReference Include =" Microsoft.Extensions.DependencyModel" Version =" 3.1.6" />
78 </ItemGroup >
89
910</Project >
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ namespace Dotnet5.GraphQL3.Services.Abstractions.Models
33 public abstract record Model < TId >
44 where TId : struct
55 {
6- private TId ? Id { get ; init ; }
6+ public TId ? Id { get ; init ; }
77 }
88}
Original file line number Diff line number Diff line change @@ -72,9 +72,8 @@ public void ConfigureServices(IServiceCollection services)
7272 . AddNotificationContext ( )
7373 . AddApplicationServices ( )
7474 . AddApplicationMessageServices ( )
75- . AddApplicationSubjects ( ) ;
76-
77- services . AddApplicationAutoMapper ( ) ;
75+ . AddApplicationSubjects ( )
76+ . AddApplicationAutoMapper ( ) ;
7877
7978 services . AddApplicationDbContext ( options =>
8079 {
You can’t perform that action at this time.
0 commit comments