Beispiel #1
0
 public IResult Delete(int cityId)
 {
     _cityDal.Delete(new City {
         Id = cityId
     });
     return(new SuccessResult());
 }
Beispiel #2
0
 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);
        }
Beispiel #4
0
        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));
 }
Beispiel #6
0
 public void Delete(City entity)
 {
     _CityDal.Delete(entity);
 }
Beispiel #7
0
 public void Delete(int cityId)
 {
     _cityDal.Delete(new City {
         Id = cityId
     });
 }
Beispiel #8
0
 public void Delete(City city)
 {
     _cityDal.Delete(city);
 }
 public IResult Delete(City city)
 {
     _cityDal.Delete(city);
     return(new SuccessDataResult <City>(Messages.DataDeleted));
 }
Beispiel #10
0
 public IResult Delete(City city)
 {
     _cityDal.Delete(city);
     return(new SuccessResult(BusinessMessages.CityDeleted));
 }
Beispiel #11
0
 public IResult Delete(City city)
 {
     _cityDal.Delete(city);
     return(new SuccessResult());
 }
Beispiel #12
0
 public void Delete(int id)
 {
     _cityDal.Delete(new City {
         ID = id
     });
 }