示例#1
0
        public IHttpActionResult Get(int id)
        {
            AnimalServices animalService = CreateAnimalService();
            var            person        = animalService.GetAnimalByID(id);

            return(Ok(person));
        }
示例#2
0
        public IHttpActionResult Get()
        {
            AnimalServices service = CreateAnimalService();
            var            animals = service.GetAnimals();

            return(Ok(animals));
        }
示例#3
0
        private AnimalServices CreateAnimalService()
        {
            var userID        = Guid.Parse(User.Identity.GetUserId());
            var animalService = new AnimalServices(userID);

            return(animalService);
        }
示例#4
0
        public IHttpActionResult GetAnimalId(int id)
        {
            AnimalServices animalService = CreateAnimalServices();
            var            animal        = animalService.GetAnimalById(id);

            return(Ok(animal));
        }
示例#5
0
        public IHttpActionResult Get()
        {
            AnimalServices animalServices = CreateAnimalServices();
            var            animals        = animalServices.GetAnimals();

            return(Ok(animals));
        }
示例#6
0
        private AnimalServices CreateAnimalServices()
        {
            var user          = User.Identity.GetUserId();
            var animalService = new AnimalServices(user);

            return(animalService);
        }
 // Use this for initialization
 void Start()
 {
     //ds.UpdateSession(0, (int)UnityApp.Utilities.ScreensScenes.RecognizeAnimalMoca);
     AnimalsList        = AnimalServices.GetAnimals().OrderBy(i => i.Counter).Take(4).ToList();
     animalSelected     = AnimalsList[0];
     ImageAnimal.sprite = GetSpriteToDisplay((int)animalSelected.AnimalType);
     ds = new DataService(Utilities.DatabaseName);
     stopwatch.Start();
     PopulateOptions();
 }