public UserModel Index(string id) { //authorize user //TODO authorize // get + map data var user = _backend.GetUser(id); if (user == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent(String.Format("'{0}' does not match a user in this system", id)) }); } else { return(new UserModel(user)); } }