public List <tblDashboardPreference> GetDashboardPreferenceByUserName(String userName) { try { ResearchEntities entity = new ResearchEntities(); ObjectResult <tblDashboardPreference> resultSet = entity.GetDashBoardPreferenceByUserName(userName); if (resultSet != null) { return(resultSet.ToList()); } return(null); } catch (Exception ex) { ExceptionTrace.LogException(ex); string networkFaultMessage = ServiceFaultResourceManager.GetString("NetworkFault").ToString(); throw new FaultException <ServiceFault>(new ServiceFault(networkFaultMessage), new FaultReason(ex.Message)); } }