Пример #1
0
        public IHttpActionResult GetClient(string policyId)
        {
            log.Debug("begin");
            PoliciesManager policiesmanager = new PoliciesManager();
            Client          cli             = policiesmanager.GetClient(policyId);

            if (cli == null)
            {
                return(Ok(default(Client)));
            }

            log.Debug("end");
            return(Ok(cli));
        }
Пример #2
0
        public IHttpActionResult GetByClientName(string clientName)
        {
            log.Debug("begin");
            PoliciesManager policiesmanager = new PoliciesManager();
            List <Policy>   policies        = policiesmanager.GetByClientName(clientName);

            if (policies == null || policies.Count == 0)
            {
                return(Ok(default(Policy)));
            }


            log.Debug("end");
            return(Ok(policies));
        }