private async Task <List <Dogs> > GetDogs()
        {
            List <Dogs> result = null;

            ApiConfigDogs apiDogs = new ApiConfigDogs()
            {
                Params = new Params()
                {
                    Size      = "full",
                    MimeType  = "jpg",
                    Format    = "json",
                    HasBreeds = false, //array vazio com ele true
                    Order     = "RANDOM",
                    Page      = 0,
                    Limit     = 50
                }
            };

            //Metodo para montar a url com parametros
            string url = apiDogs.GetUrlParams(apiDogs.Params);

            DogsService service = new DogsService();

            result = await service.Get(url);

            return(result);
        }
Пример #2
0
        public DogsWindow()
        {
            InitializeComponent();
            DogsBaseEntities db = new DogsBaseEntities();

            dogsService = new DogsService(db);
            dogProfileData.ItemsSource = dogsService.GetDogList();
        }
Пример #3
0
        public AddDog()
        {
            InitializeComponent();
            DogsBaseEntities db = new DogsBaseEntities();

            dogsService          = new DogsService(db);
            AddDogDG.ItemsSource = dogsService.GetDogList();
        }
Пример #4
0
        public Highscore()
        {
            InitializeComponent();
            DogsBaseEntities db = new DogsBaseEntities();

            dogsService = new DogsService(db);
            HighscoreGrid.ItemsSource = dogsService.GetHighscoreList();
        }
Пример #5
0
        public JuniorWindow()
        {
            InitializeComponent();
            DogsBaseEntities db = new DogsBaseEntities();

            dogsService = new DogsService(db);
            NewScoreGrid.ItemsSource = db.Scores.ToList();
        }
Пример #6
0
        public AddOwner()
        {
            InitializeComponent();
            DogsBaseEntities db = new DogsBaseEntities();

            dogsService = new DogsService(db);
            OwnerProfile.ItemsSource = dogsService.GetOwnerList();
        }
 public void Test()
 {
     DogsService dogsService = new DogsService();
     var dogs = dogsService.GetAll().ToList();
 }
Пример #8
0
 public DogsController(DogsService ds)
 {
     _ds = ds;
 }
Пример #9
0
 public DogsController(DogsService ds) //DEPENDENCY INJECTION
 {
     _ds = ds;
 }