public HttpResponseMessage GetAllContacts() { HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK); UserPrincipal loggedInUser = (UserPrincipal)HttpContext.Current.User; List <Contact> contacts = ContactBLL.GetContacts(loggedInUser.AccountSession.ClubId); List <ContactModel> models = ContactModel.MapModels(contacts); response.Content = new ObjectContent <List <ContactModel> >(models, new JsonMediaTypeFormatter()); return(response); }