Beispiel #1
0
 /// <summary>Gets the list of user roles by UserId.</summary>
 /// <param name="userId">The Long object.</param>
 /// <returns>List of UserRoles.</returns>
 public List <UserRoles> GetUserRoles(Int64 userId)
 {
     Logging.LogDebugMessage("Method: GetUserRoles, MethodType: Get, Layer: SecurityBL, Parameters: userId = " + userId.ToString());
     using (SecurityDAL userRoles = new SecurityDAL())
     {
         try
         {
             return(userRoles.GetUserRoles(userId));
         }
         catch (SqlException sqlEx)
         {
             Logging.LogErrorMessage("Method: GetUserRoles, Layer: SecurityBL, Stack Trace: " + sqlEx.ToString());
             throw;
         }
         catch (Exception ex)
         {
             Logging.LogErrorMessage("Method: GetUserRoles, Layer: SecurityBL, Stack Trace: " + ex.ToString());
             throw;
         }
     }
 }