private async void DeleteDogFromListAction(object obj)
        {
            Debug.WriteLine("DELETE DOG FROM LIST ACTION");

            var myItem = obj as Dog;

            _observableCollectionOfDogs.Remove(myItem);


            var myCosmosDog = DogConverter.ConvertToCosmosDog(myItem);

            await CosmosDBService.DeleteCosmosDogAsync(myCosmosDog);
        }
Example #2
0
        private async void DeleteDogFromListAction(object obj)
        {
            Debug.WriteLine("DELETE DOG FROM LIST ACTION");
            var myItem = obj as Dog;

            Debug.WriteLine($"Removing dog {myItem}");

            if (_observableCollectionOfDogs.Remove(myItem))
            {
                var myCosmosDog = DogConverter.ConvertToCosmosDog(myItem);
                await CosmosDBService.DeleteCosmosDogAsync(myCosmosDog);
            }
            else
            {
                Debug.WriteLine($"Dog not reomved from observable collection {myItem}");
            }
        }
 private async void AddLastDogToCosmosDBAsync()
 {
     var myDog       = App.DogPhotoRep.GetLastDogPhoto();
     var myCosmosDog = DogConverter.ConvertToCosmosDog(myDog);
     await CosmosDB.CosmosDBServicePhoto.PostCosmosDogAsync(myCosmosDog);
 }