public IEnumerable <CategoryLog> GetAllCategoryLogs() { List <CategoryLog> categoryLogs = new List <CategoryLog>(); using (OracleConnection connection = new OracleConnection(_connectionString)) { using (OracleCommand command = connection.CreateCommand()) { connection.Open(); command.BindByName = true; command.CommandText = "Select * From CATEGORY_LOG"; OracleDataReader reader = command.ExecuteReader(); while (reader.Read()) { CategoryLog categoryLog = new CategoryLog { LogId = Convert.ToInt32(reader["LOG_ID"]), LogType = reader["LOG_TYPE"].ToString(), NewName = reader["NEW_NAME"].ToString(), OldName = reader["OLD_NAME"].ToString(), LogDate = reader["LOG_DATE"].ToString(), }; categoryLogs.Add(categoryLog); } } } return(categoryLogs); }
public static CategoryLog WithLog(this CategoryLog categoryLog, Log log) { categoryLog.Log = log; return(categoryLog); }
public static CategoryLog WithLogID(this CategoryLog categoryLog, Int32 logID) { categoryLog.LogID = logID; return(categoryLog); }
public static CategoryLog WithCategory(this CategoryLog categoryLog, Category category) { categoryLog.Category = category; return(categoryLog); }
public static CategoryLog WithCategoryID(this CategoryLog categoryLog, Int32 categoryID) { categoryLog.CategoryID = categoryID; return(categoryLog); }