Esempio n. 1
0
        public ServiceResult Get()
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }
            DataFilter     filter         = this.GetFilter(Request);
            AnatomyManager anatomyManager = new AnatomyManager(Globals.DBConnectionKey, this.GetAuthToken(Request));
            List <dynamic> anatomy        = anatomyManager.GetAnatomies(CurrentUser.AccountUUID, ref filter).Cast <dynamic>().ToList();

            return(ServiceResponse.OK("", anatomy, filter.TotalRecordCount));
        }
Esempio n. 2
0
        public ServiceResult Get(string filter = "")
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }

            AnatomyManager anatomyManager = new AnatomyManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter);
            List <dynamic> anatomy        = anatomyManager.GetAnatomies(CurrentUser.AccountUUID).Cast <dynamic>().ToList();
            int            count;
            DataFilter     tmpFilter = this.GetFilter(filter);

            anatomy = FilterEx.FilterInput(anatomy, tmpFilter, out count);
            return(ServiceResponse.OK("", anatomy, count));
        }
Esempio n. 3
0
        public void AnatomyManager_GetAnatomys()
        {
            AnatomyManager m = new AnatomyManager(new TreeMonDbContext(connectionKey));

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