Beispiel #1
0
        public static SqlProc WithParam(this SqlProc proc, object namedParam)
        {
            if (namedParam != null)
            {
                proc.Param = NameProperties.Parse(namedParam);
            }

            return(proc);
        }
Beispiel #2
0
        public bool ExecNamed(Context context, object paramNamed, int iFrom = 0, int iTake = 0)
        {
            NameProperties prop     = new NameProperties(paramNamed);
            string         execName = prop.GetValue(paramNamed, prop.FirstName()) as string;
            var            proc     = SqlProcExt.CmdText(execName, context);

            if (prop.List.Count > 1)
            {
                proc.Param = NameProperties.Parse(paramNamed, 1);
            }

            return(ExecProc(proc, iFrom, iTake));
        }