/// <summary> /// Tell: Delete a hitter in the database /// </summary> private void HandleDeleteHitterById(PlayerQuery obj) { var dbRequest = new DbRequestMessage { Query = DbRequestType.DeleteOne, Id = obj.Id }; _dbHitterWriter.Tell(dbRequest); }
/// <summary> /// Ask: Fire the request for the player /// </summary> private void HandleGetPitcherById(PlayerQuery obj) { Debug.WriteLine("StatsCoordinatorActor HandleGetPitcherById"); var dbRequest = new DbRequestMessage { Query = DbRequestType.GetById, Id = obj.Id}; _dbPitcherReader.Ask(dbRequest).PipeTo(Sender); }
/// <summary> /// Tell: Delete all the pitchers in the database /// </summary> private void HandleDeleteAllPitchers(PlayerQuery obj) { var dbRequest = new DbRequestMessage { Query = DbRequestType.DeleteMany }; _dbPitcherWriter.Tell(dbRequest); }
/// <summary> /// Ask: Fire the request for all the pitchers /// </summary> private void HandleGetAllPitchers(PlayerQuery message) { Debug.WriteLine("StatsCoordinatorActor HandleGetAllPitchers"); var dbRequest = new DbRequestMessage {Query = DbRequestType.GetAll}; _dbPitcherReader.Ask(dbRequest).PipeTo(Sender); }