public List<NwUserCandidate> GetCandidates(List<NWUser> users, DbContext db)
        {
            List<NwUserCandidate> list = new List<NwUserCandidate>();

            foreach(NWUser u in users)
            {
                NwUserCandidate c = new NwUserCandidate(u);
                list.Add(c);
            }

            return list;
        }
        public ActionResult AddToDirectory(string key, string value)
        {
            string result = "OK";

            List<NWUser> l = _external.NWUsers.Where(key, new object[] { value }).ToList();

            if (l.Count() == 0)
                result = (new ExceptionCollector(string.Format("{0} = {1} was not found in NWUSers table", key, value))).ToUL();
            else
            {
                try
                {
                    NwUserCandidate c = new NwUserCandidate(l[0]);
                    c.AddToDirectory();
                }
                catch(Exception ex)
                {
                    result = (new ExceptionCollector(ex).ToUL());
                }
            }

            return Content(result);

        }