public HttpResponseMessage GetClosedPeriodBySolution(HttpRequestMessage request, string solutionName) { return(GetHttpResponse(request, () => { ClosedPeriodData closedPeriod = _ExtractionProcessService.GetClosedPeriods().Where(c => c.SolutionName == solutionName).FirstOrDefault(); return request.CreateResponse <ClosedPeriodData>(HttpStatusCode.OK, closedPeriod); })); }