using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DapperORMCore.Dapper { public class PropertyContainer { private readonly Dictionary _ids; private readonly Dictionary _values; #region Properties internal IEnumerable IdNames { get { return _ids.Keys; } } internal IEnumerable ValueNames { get { return _values.Keys; } } internal IEnumerable AllNames { get { return _ids.Keys.Union(_values.Keys); } } internal IDictionary IdPairs { get { return _ids; } } internal IDictionary ValuePairs { get { return _values; } } public IEnumerable> AllPairs { get { return _ids.Concat(_values); } } #endregion #region Constructor internal PropertyContainer() { _ids = new Dictionary(); _values = new Dictionary(); } #endregion #region Methods internal void AddId(string name, object value) { _ids.Add(name, value); } internal void AddValue(string name, object value) { _values.Add(name, value); } #endregion } }