예제 #1
0
        ////WEBAPI public async void DeleteEVSpecs(string id)
        public async Task <IActionResult> DeleteEVSpecs([HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "BEV/DeleteEVSpecs/{id}")] HttpRequest request, string id)
        {
            // TODO cleanup
            await respository.DeleteItemAsync(id);

            return(Ok());
        }
        public async Task <IActionResult> DeleteContact([HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "Contact/DeleteContact/{id}")] HttpRequest request, string id)
        {
            // Todo verify id
            await repository.DeleteItemAsync(id);

            return(Ok());
        }
        public async Task <Journey> DeleteAsync(Journey Journey, HttpRequestMessage req)
        {
            Journey.deleted = true;
            return(await _JourneyRepository.DeleteItemAsync(Journey.id, Journey, req));

            return(Journey);
        }
예제 #4
0
        public async Task <Organisation> DeleteAsync(Organisation item, HttpRequestMessage req)
        {
            var OrganisationBefore = await _organisationRepository.GetItemAsync(item.id);

            item = await _organisationRepository.DeleteItemAsync(item.id, item, req);

            return(item);
        }
예제 #5
0
        public async Task <ActionResult> DeleteConfirmedAsync([Bind("Id")] string id)
        {
            Item item = await respository.GetItemAsync(id);

            await respository.DeleteItemAsync(id, item);

            return(RedirectToAction("Index"));
        }
        public async Task <Driver> DeleteAsync(Driver Driver, HttpRequestMessage req)
        {
            var DriverBefore = await _DriverRepository.GetItemAsync(Driver.id);


            Driver = await _DriverRepository.DeleteItemAsync(Driver.id, Driver, req);

            return(Driver);
        }
        public async Task <IActionResult> Delete([FromRoute] string id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            await _repository.DeleteItemAsync(id);

            return(Ok(id));
        }
예제 #8
0
        public async Task DeleteAsync(string id)
        {
            Customer item = await Respository.GetItemAsync(id);

            // just using the manager to do something extra

            if (item == null)
            {
                throw new Exception("Id can not be found");
            }
            await Respository.DeleteItemAsync(id);
        }
        public async Task <bool> Delete(string id, string cityname)
        {
            try
            {
                await Respository.DeleteItemAsync(id, CollectionId, cityname);

                await _hubContext.Clients.All.BroadcastMessage();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
        public async Task <ActionResult> DeleteAsync(string id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            Item item = await Respository.GetItemAsync(id);

            if (item == null)
            {
                return(NotFound());
            }
            else
            {
                await Respository.DeleteItemAsync(id);
            }

            return(Ok(item));
        }
예제 #11
0
 public IActionResult Delete(string id)
 {
     _repository.DeleteItemAsync(id);
     return(RedirectToAction(nameof(Index)));
 }
예제 #12
0
 public IActionResult DeleteLifter(string id)
 {
     _repository.DeleteItemAsync(id);
     return(NoContent());
 }
예제 #13
0
        public async Task <ActionResult> DeleteConfirmedAsync([Bind("Id")] string id)
        {
            await _repository.DeleteItemAsync(id);

            return(RedirectToAction("Index"));
        }
        public IActionResult Delete(string id)
        {
            var res = _repo.DeleteItemAsync(id, collectionId);

            return(Ok(res.Status));
        }
        public IActionResult Delete(string id)
        {
            var res = Respository.DeleteItemAsync(id);

            return(Ok(res.Status));
        }
        public async Task <IActionResult> DeleteConfirmed(string id)
        {
            await _repo.DeleteItemAsync(id);

            return(RedirectToAction(nameof(Index)));
        }
예제 #17
0
 public void Delete(string id)
 {
     repo.DeleteItemAsync(id);
 }