public GetContactByContactIdDataResponse GetContactByContactId(GetContactByContactIdDataRequest request) { GetContactByContactIdDataResponse result = new GetContactByContactIdDataResponse(); if (request == null) { throw new ArgumentNullException("request"); } try { IContactRepository repo = Factory.GetRepository(request, RepositoryType.Contact); if (repo == null) { throw new Exception("The repository should not be null"); } result.Contact = repo.FindByID(request.ContactId) as ContactData; result.Limit = Limit; } catch (Exception ex) { throw ex; } return(result); }
public GetContactByContactIdDataResponse Get(GetContactByContactIdDataRequest request) { GetContactByContactIdDataResponse response = new GetContactByContactIdDataResponse(); response.Version = request.Version; try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("ContactDD:Get()::Unauthorized Access"); } response = Manager.GetContactByContactId(request); } catch (Exception ex) { CommonFormat.FormatExceptionResponse(response, base.Response, ex); string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0"; Helpers.LogException(int.Parse(aseProcessID), ex); } return(response); }