public IResult Delete(int cityId) { _cityDal.Delete(new City { Id = cityId }); return(new SuccessResult()); }
public int DeleteCity(int Id) { _cityDal.Delete(new City { Id = Id }); return(Id); }
public async Task <CityForReturnDto> Delete(int Id) { var checkFromDb = await cityDal.GetAsync(x => x.Id == Id); if (checkFromDb == null) { throw new RestException(HttpStatusCode.BadRequest, new { NotFound = Messages.NotFound }); } await cityDal.Delete(checkFromDb); var mapForReturn = mapper.Map <City, CityForReturnDto>(checkFromDb); return(mapForReturn); }
public bool Delete(int id) { var deleteObject = _cityDal.GetOne(x => x.id == id); if (deleteObject != null) { bool result = _cityDal.Delete(deleteObject); if (result) { return(true); } return(false); } return(false); }
public IResult Delete(City entity) { _cityDal.Delete(entity); return(new SuccessResult(Messages.CityDeleted)); }
public void Delete(City entity) { _CityDal.Delete(entity); }
public void Delete(int cityId) { _cityDal.Delete(new City { Id = cityId }); }
public void Delete(City city) { _cityDal.Delete(city); }
public IResult Delete(City city) { _cityDal.Delete(city); return(new SuccessDataResult <City>(Messages.DataDeleted)); }
public IResult Delete(City city) { _cityDal.Delete(city); return(new SuccessResult(BusinessMessages.CityDeleted)); }
public IResult Delete(City city) { _cityDal.Delete(city); return(new SuccessResult()); }
public void Delete(int id) { _cityDal.Delete(new City { ID = id }); }