// GET: api/Categories public IHttpActionResult Get() { string token = GetAuthToken(); if (string.IsNullOrEmpty(token)) { return(Unauthorized()); } DataAccessSoapClient ws = new DataAccessSoapClient(); Category[] categories = ws.FindAllCategories(new Security { BinarySecurityToken = token }); return(Ok(categories.Select(c => new { Id = c.Id, Name = c.Name }))); }