コード例 #1
0
 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");
     }
 }
コード例 #2
0
 /// <summary>
 /// <inheritdoc/>
 /// </summary>
 public IResult Delete(Hotel entity)
 {
     try
     {
         _hotelDal.Delete(entity);
         return(new SuccessResult(Messages.HotelDeleted));
     }
     catch
     {
         return(new ErrorResult(Messages.HotelDeleteError));
     }
 }
コード例 #3
0
 public void Delete(int hotelId)
 {
     _hotelDal.Delete(new Hotel {
         Id = hotelId
     });
 }
コード例 #4
0
 public IResult Delete(Hotel entity)
 {
     _hotelDal.Delete(entity);
     return(new SuccessResult(Messages <Hotel> .Deleted));
 }
コード例 #5
0
 public void Delete(Hotel entity)
 {
     _hotelDal.Delete(entity);
 }