public static string GetDescription(this ValidationResponses val) { DescriptionAttribute[] attributes = (DescriptionAttribute[])val .GetType() .GetField(val.ToString()) .GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }
public virtual void Reset(CommandType type) { if (CommandObject != null) { CommandObject.CommandText = string.Empty; CommandObject.CommandType = type; CommandObject.Parameters.Clear(); } LastException = null; SQL = string.Empty; RowsAffected = 0; IdentityGenerated = null; ValidationResponses.Clear(); }