This commit is contained in:
@@ -157,6 +157,26 @@ namespace DynamORM
|
|||||||
|
|
||||||
#region Table
|
#region Table
|
||||||
|
|
||||||
|
/// <summary>Gets dynamic table which is a simple ORM using dynamic objects.</summary>
|
||||||
|
/// <param name="action">The action with nstance of <see cref="DynamicTable"/> as parameter.</param>
|
||||||
|
/// <param name="table">Table name.</param>
|
||||||
|
/// <param name="keys">Override keys in schema.</param>
|
||||||
|
public void Table(Action<dynamic> action, string table = "", string[] keys = null)
|
||||||
|
{
|
||||||
|
using (dynamic t = Table(table, keys))
|
||||||
|
action(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Gets dynamic table which is a simple ORM using dynamic objects.</summary>
|
||||||
|
/// <typeparam name="T">Type used to determine table name.</typeparam>
|
||||||
|
/// <param name="action">The action with nstance of <see cref="DynamicTable"/> as parameter.</param>
|
||||||
|
/// <param name="keys">Override keys in schema.</param>
|
||||||
|
public void Table<T>(Action<dynamic> action, string[] keys = null)
|
||||||
|
{
|
||||||
|
using (dynamic t = Table<T>(keys))
|
||||||
|
action(t);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Gets dynamic table which is a simple ORM using dynamic objects.</summary>
|
/// <summary>Gets dynamic table which is a simple ORM using dynamic objects.</summary>
|
||||||
/// <param name="table">Table name.</param>
|
/// <param name="table">Table name.</param>
|
||||||
/// <param name="keys">Override keys in schema.</param>
|
/// <param name="keys">Override keys in schema.</param>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace DynamORM.Mapper
|
|||||||
/// <summary>Gets map of columns to properties.</summary>
|
/// <summary>Gets map of columns to properties.</summary>
|
||||||
public Dictionary<string, DynamicPropertyInvoker> ColumnsMap { get; private set; }
|
public Dictionary<string, DynamicPropertyInvoker> ColumnsMap { get; private set; }
|
||||||
|
|
||||||
/// <summary>Gets map of properties to column.</summary>
|
/// <summary>Gets map of properties to column.</summary>
|
||||||
public Dictionary<string, string> PropertyMap { get; private set; }
|
public Dictionary<string, string> PropertyMap { get; private set; }
|
||||||
|
|
||||||
/// <summary>Gets list of ignored properties.</summary>
|
/// <summary>Gets list of ignored properties.</summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user