/// <summary> /// Update last played and possibly game over date /// </summary> /// <param name="gameID">The ID of the game to update</param> /// <param name="playedLast">The datetime to mark the game as last played</param> /// <param name="gameOver">The datetime the game was ended</param> public void Execute(Int32 gameID, DateTime playedLast, DateTime? gameOver) { Entities.Filters.Game.UpdateDates filter = new Entities.Filters.Game.UpdateDates(); filter.GameID = gameID; filter.PlayedLast = playedLast; filter.GameOver = gameOver; _update.Execute(filter); }
/// <summary> /// Update last played and possibly game over date /// </summary> /// <param name="gameID">The ID of the game to update</param> /// <param name="playedLast">The datetime to mark the game as last played</param> /// <param name="gameOver">The datetime the game was ended</param> public void Execute(Int32 gameID, DateTime playedLast, DateTime?gameOver) { Entities.Filters.Game.UpdateDates filter = new Entities.Filters.Game.UpdateDates(); filter.GameID = gameID; filter.PlayedLast = playedLast; filter.GameOver = gameOver; _update.Execute(filter); }
/// <summary> /// Update last played and possibly game over date based on <paramref name="filter"/> /// </summary> /// <param name="filter">The filter used to determine what game to update and the dates to update it with</param> public void Execute(Entities.Filters.Game.UpdateDates filter) { using (DbCommand cmd = _db.GetStoredProcCommand("Game_Update")) { _db.AddInParameter(cmd, "@GameID", DbType.Int32, filter.GameID); _db.AddInParameter(cmd, "@PlayedLast", DbType.DateTime, filter.PlayedLast); _db.AddInParameter(cmd, "@GameOver", DbType.DateTime, filter.GameOver); _db.ExecuteNonQuery(cmd); } }
/// <summary> /// Update last played and possibly game over date based on <paramref name="filter"/> /// </summary> /// <param name="filter">The filter used to determine what game to update and the dates to update it with</param> public void Execute(Entities.Filters.Game.UpdateDates filter) { _update.Execute(filter); }