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

            AnatomyManager anatomyManager = new AnatomyManager(Globals.DBConnectionKey, this.GetAuthToken(Request));
            List <Anatomy> s = anatomyManager.Search(name);

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

            return(ServiceResponse.OK("", s));
        }