Ejemplo n.º 1
0
        public IDBTableAdapterCommand <T> CreateUpdateCommand(DBTableAdapterContext <T> context)
        {
            if (context.PkColumns.Count() == 0)
            {
                return(null);
            }
            var cmd = new NoQueryCommand <T>(
                _SqlResolver.UpdateTemplate(context),
                context.PkColumnsInfo.Concat(context.SetColumnsInfo).Select(i => new CommandParameter <T> {
                Column = i
            })
                );

            return(cmd);
        }
Ejemplo n.º 2
0
        public IDBTableAdapterCommand <T> CreateUpdateCommand(DBTableAdapterContext <T> context)
        {
            if (context.PkColumns.Count() == 0)
            {
                return(null);
            }
            var cmd = new ReturningCommand <T>(
                _SqlResolver.UpdateTemplate(context),
                context.AllColumnsInfo.Select(i => new CommandParameter <T> {
                Column = i, Direction = ParameterDirection.InputOutput
            })
                );

            return(cmd);
        }