Beispiel #1
0
        public void Projection <T>(Action <ProjectionModelBuilder <T> > config)
        {
            var builder = new ProjectionModelBuilder <T>();

            config(builder);
            _projections.Add(builder);
            _services.AddScoped(typeof(T));
        }
Beispiel #2
0
        public void Projection <T>(Func <IServiceProvider, T> factory, Action <ProjectionModelBuilder <T> > config) where T : class
        {
            var builder = new ProjectionModelBuilder <T>();

            config(builder);
            _projections.Add(builder);
            _services.AddScoped(factory);
        }
Beispiel #3
0
 public static ProjectionModelBuilder <T> WithMongoState <T>(this ProjectionModelBuilder <T> builder, string connectionString)
 {
     return(builder.WithState(new MongoProjectionStateProvider(MongoUrl.Create(connectionString))));
 }