public HttpResponseMessage GetAllCampaigns(HttpRequestMessage request) //Get all campaigns { var campaigns = _studentApi.GetAllCampaigns(); var campaignVm = CampaignViewModel.MultipleCampaignsMap(campaigns); foreach (var model in campaignVm) { var student = _studentApi.GetStudent(model.StudentId); model.Name = student.Firstname; model.Surname = student.Surname; } var response = request.CreateResponse(HttpStatusCode.OK, campaignVm); return(response); }