public SearchContactsDataResponse SearchContacts(SearchContactsDataRequest request) { var response = new SearchContactsDataResponse(); try { var repo = Factory.GetRepository(request, RepositoryType.Contact); var searchTotalCount = repo.GetSearchContactsCount(request); if (searchTotalCount > 0) { response.Contacts = repo.SearchContacts(request) as List <ContactData>; } else { response.Contacts = new List <ContactData>(); } response.Version = request.Version; response.TotalCount = searchTotalCount; } catch (Exception ex) { throw ex; } return(response); }
public SearchContactsDataResponse Post(SearchContactsDataRequest request) { if (request == null) { throw new ArgumentNullException("request"); } var response = new SearchContactsDataResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("ContactDD:SearchContactsDataRequest()::Unauthorized Access"); } response = Manager.SearchContacts(request); response.Version = request.Version; } catch (Exception ex) { CommonFormatter.FormatExceptionResponse(response, base.Response, ex); string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0"; Common.Helper.LogException(int.Parse(aseProcessID), ex); } return(response); }
public long GetSearchContactsCount(SearchContactsDataRequest request) { throw new NotImplementedException(); }
public IEnumerable <object> SearchContacts(SearchContactsDataRequest request) { throw new NotImplementedException(); }