Ejemplo n.º 1
0
        public static List <SubscriberByOriginationDestination> GetSubscriberByOriginationDestination(string origination,
                                                                                                      string destination)
        {
            string sqlQuery = "GetSubscriberByOriginationDestination {0}, {1}";

            object[] sqlParams =
            {
                new SqlParameter("p_Origination", origination),
                new SqlParameter("p_Destination", destination)
            };

            return(_subscriberByOriginationDestinationRepository.ExecWithStoreProcedure(sqlQuery, sqlParams).ToList());
        }
        public async Task <List <SubscriberByOriginationDestination> > GetSubscriberByOriginationDestination(string origination, string destination)
        {
            try
            {
                string sqlQuery = string.Format("Call GetSubscriberByOriginationDestination('{0}', '{1}')", origination, destination);

                var result = await Task.Run(() => _subscriberByOriginationDestinationRepository.ExecWithStoreProcedure(sqlQuery));

                return(result.ToList());
            }
            catch (System.Exception ex)
            {
                Logger.Error(ex.ToString());
                throw new Exception(ex.ToString());
            }
        }