public async Task DeleteHotel(int id) { if (id > 0) { await hotelDal.Delete(id); } else { throw new Exception("ID Alani Sifirdan Kucuk Ve Eşit Olamaz"); } }
/// <summary> /// <inheritdoc/> /// </summary> public IResult Delete(Hotel entity) { try { _hotelDal.Delete(entity); return(new SuccessResult(Messages.HotelDeleted)); } catch { return(new ErrorResult(Messages.HotelDeleteError)); } }
public void Delete(int hotelId) { _hotelDal.Delete(new Hotel { Id = hotelId }); }
public IResult Delete(Hotel entity) { _hotelDal.Delete(entity); return(new SuccessResult(Messages <Hotel> .Deleted)); }
public void Delete(Hotel entity) { _hotelDal.Delete(entity); }