Пример #1
0
        protected virtual object GetUpdateWhere(Command command, IID id)
        {
            object[] attribs           = currentType.GetCustomAttributes(typeof(TableDefinitionAttribute), false);
            TableDefinitionAttribute a = attribs[0] as TableDefinitionAttribute;

            command.Parameters.Add(new Parameter("@" + a.PrimaryKey, GenericDbType.String)
            {
                SourceColumn = a.PrimaryKey,
                Value        = id.ConvertToDbValue()
            });

            return(string.Format("{0} = @{0}", a.PrimaryKey));
        }