diff --git a/MySqlPlus.Example/Program.cs b/MySqlPlus.Example/Program.cs index 2dc5d19..8de4c74 100644 --- a/MySqlPlus.Example/Program.cs +++ b/MySqlPlus.Example/Program.cs @@ -6,7 +6,7 @@ namespace MontoyaTech.MySqlPlus.Example public class Program { [MySqlRow("cars")] - [MySqlRowIndex("make_model", "model", "year")] + [MySqlRowIndex("model_year", "model", "year")] [MySqlRowIndex("year", "year")] public class Car { diff --git a/MySqlPlus/MySqlPlus.csproj b/MySqlPlus/MySqlPlus.csproj index e794753..e7a4a43 100644 --- a/MySqlPlus/MySqlPlus.csproj +++ b/MySqlPlus/MySqlPlus.csproj @@ -7,7 +7,7 @@ MontoyaTech.MySqlPlus MontoyaTech.MySqlPlus MontoyaTech.MySqlPlus - 1.0.5 + 1.0.6 MontoyaTech A simple C# library to help work with MySql. MontoyaTech 2023 diff --git a/MySqlPlus/MySqlRow.cs b/MySqlPlus/MySqlRow.cs index 4249f5e..3405b38 100644 --- a/MySqlPlus/MySqlRow.cs +++ b/MySqlPlus/MySqlRow.cs @@ -13,10 +13,20 @@ namespace MontoyaTech.MySqlPlus [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)] public class MySqlRow : Attribute { + /// + /// The name of the table. + /// public string Name; + /// + /// Creates a new default MySqlRow. + /// public MySqlRow() { } + /// + /// Creates a new MySqlRow with a name. + /// + /// public MySqlRow(string name) { this.Name = name; diff --git a/MySqlPlus/MySqlRowIndex.cs b/MySqlPlus/MySqlRowIndex.cs index 5ffe50a..7e2c929 100644 --- a/MySqlPlus/MySqlRowIndex.cs +++ b/MySqlPlus/MySqlRowIndex.cs @@ -13,12 +13,27 @@ namespace MontoyaTech.MySqlPlus [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true, Inherited = true)] public class MySqlRowIndex : Attribute { + /// + /// The name of this index. + /// public string Name; + /// + /// The name of the columns that belong to this index. + /// public string[] Columns; + /// + /// Creates a new default MySqlRowIndex. + /// public MySqlRowIndex() { } + /// + /// Creates a new default MySqlRowIndex with a name and column names. + /// + /// + /// + /// public MySqlRowIndex(string name, params string[] columns) { if (columns == null || columns.Length == 0)