Exemplo n.º 1
0
        public ServiceResult Search(string name)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                return(ServiceResponse.Error("You must provide a name for the AnatomyTags."));
            }

            AnatomyManager    AnatomyTagsManager = new AnatomyManager(Globals.DBConnectionKey, this.GetAuthToken(Request));
            List <AnatomyTag> s = AnatomyTagsManager.GetAnatomyTags(name);

            if (s == null)
            {
                return(ServiceResponse.Error("AnatomyTags could not be located for the name " + name));
            }

            return(ServiceResponse.OK("", s));
        }
Exemplo n.º 2
0
        public void AnatomyManager_GetAnatomyTags()
        {
            AnatomyManager m = new AnatomyManager(new TreeMonDbContext(connectionKey));

            Assert.IsTrue(m.GetAnatomyTags("a").Count > 0);
        }