public IHttpActionResult Get(int id) { AnimalServices animalService = CreateAnimalService(); var person = animalService.GetAnimalByID(id); return(Ok(person)); }
public IHttpActionResult Get() { AnimalServices service = CreateAnimalService(); var animals = service.GetAnimals(); return(Ok(animals)); }
private AnimalServices CreateAnimalService() { var userID = Guid.Parse(User.Identity.GetUserId()); var animalService = new AnimalServices(userID); return(animalService); }
public IHttpActionResult GetAnimalId(int id) { AnimalServices animalService = CreateAnimalServices(); var animal = animalService.GetAnimalById(id); return(Ok(animal)); }
public IHttpActionResult Get() { AnimalServices animalServices = CreateAnimalServices(); var animals = animalServices.GetAnimals(); return(Ok(animals)); }
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(); }