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