Example #1
0
 public bool Update(RateDto rateDto)
 {
     try
     {
         _context.Rate.Update(rateDto.DtoToEntity());
         _context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #2
0
 public bool Delete(RateDto rateDto)
 {
     try
     {
         if (rateDto != null)
         {
             _context.Rate.Remove(rateDto.DtoToEntity());
             _context.SaveChanges();
             return(true);
         }
         return(false);
     }
     catch
     {
         return(false);
     }
 }