// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var system = new CartSystem(); var projectionStore = new SqliteProjectionStore(); services.AddSingleton <CartSystem>(system); services.AddSingleton <SqliteProjectionStore>(projectionStore); services.AddMvc(); }
public InventoryQueryActor() { _projectionStore = new SqliteProjectionStore(); InitializeProjection(); Events().ForEach(eventType => { Context.System.EventStream.Subscribe(Self, eventType); }); Ready(); }
public InventoryQueryController(SqliteProjectionStore projectionStore) { _projectionStore = projectionStore; }