public virtual ModelBuilder ApplyConfiguration <TQuery>([NotNull] IQueryTypeConfiguration <TQuery> configuration)
            where TQuery : class
        {
            Check.NotNull(configuration, nameof(configuration));

            configuration.Configure(Query <TQuery>());

            return(this);
        }
Exemple #2
0
        public override ModelBuilder ApplyConfiguration <TQuery>([NotNull] IQueryTypeConfiguration <TQuery> configuration)
        {
            configuration.Configure(Query <TQuery>());

            return(this);
        }
        public static ModelBuilder ApplyConfiguration <T>(this ModelBuilder modelBuilder, IQueryTypeConfiguration <T> configuration) where T : class
        {
            var entityType = FindQueryType(configuration.GetType());

            dynamic entityTypeBuilder = entityMethod
                                        .MakeGenericMethod(entityType)
                                        .Invoke(modelBuilder, new object[0]);

            configuration.Configure(entityTypeBuilder);

            return(modelBuilder);
        }