Example #1
0
 public IEnumerable <UserMessages> GetUserMessagesByAdvertismentId(int advertId, string currentUserId)
 {
     try
     {
         return(_repository.GetUserMessagesByAdvertismentId(advertId, currentUserId));
     }
     catch (ArgumentNullException ex)
     {
         Log.Error(ex, MessagingConstants.ARGUMENT_NULL_MESSAGE);
         throw;
     }
     catch (Exception ex)
     {
         Log.Error(ex, MessagingConstants.MessageGetErrorGeneral());
         throw;
     }
 }
Example #2
0
 public IEnumerable <UserMessages> GetUserMessagesByFromUserToUser(string fromUserId, string toUserId)
 {
     try
     {
         return(_repository.GetUserMessagesByFromUserToUser(fromUserId, toUserId));
     }
     catch (ArgumentNullException ex)
     {
         Log.Error(ex, MessagingConstants.ARGUMENT_NULL_MESSAGE);
         throw;
     }
     catch (Exception ex)
     {
         Log.Error(ex, MessagingConstants.MessageGetErrorGeneral());
         throw;
     }
 }
Example #3
0
 public IEnumerable <UserMessages> GetUserMessagesByFromUserToUserAndDateSentAndRead(string fromUserId,
                                                                                     string toUserId, DateTime dateSent, bool readStatus)
 {
     try
     {
         return(_repository.GetUserMessagesByFromUserToUserAndDateSentAndRead(fromUserId, toUserId, dateSent,
                                                                              readStatus));
     }
     catch (ArgumentNullException ex)
     {
         Log.Error(ex, MessagingConstants.ARGUMENT_NULL_MESSAGE);
         throw;
     }
     catch (Exception ex)
     {
         Log.Error(ex, MessagingConstants.MessageGetErrorGeneral());
         throw;
     }
 }