Пример #1
0
        public List <T> ExecuteProcedure <T>(string proName, BFParameters parms)
        {
            string proc = proName;
            var    ps   = parms.GetDbParameters(ref proc);

            return(Database.SqlQuery <T>(proc, ps).ToList());
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="proName"></param>
        /// <param name="parms"></param>
        /// <returns></returns>
        public int ExecuteProcedure(string proName, BFParameters parms)
        {
            string proc = proName;
            var    ps   = parms.GetDbParameters(ref proc);

            //var res = Database.SqlQuery<int>(proc, ps);
            //return res.FirstOrDefault();
            var res = Database.ExecuteSqlCommand(proc, ps);

            return(res);
        }