Exemplo n.º 1
0
 protected override void CompilerImplementation(TEntity Entity)
 {
     foreach (DBTableField Field in Manager.Cache.GetFields <TEntity>())
     {
         FieldValueMap.Add(Field.Name, null);
     }
 }
Exemplo n.º 2
0
        protected override void CompilerImplementation(TEntity Entity)
        {
            foreach (DBTableField Field in Manager.Cache.GetFields <TEntity>())
            {
                if (Field.IsPrimaryKey)
                {
                    SingleCondition = (Field.Name, new MySqlParameter
                    {
                        ParameterName = "@0",
                        Value = Field.Property.GetValue(Entity)
                    });
                    continue;
                }

                if (Field.IsAutoIncrement)
                {
                    continue;
                }

                FieldValueMap.Add(Field.Name, new MySqlParameter
                {
                    ParameterName = "@" + ++ParameterIdentifier,
                    Value         = Field.Property.GetValue(Entity)
                });
            }
        }