public HttpResponseMessage Post(CreatePackSchedule values) { if (values == null || !ModelState.IsValid) { return(new HttpResponseMessage(HttpStatusCode.BadRequest) { ReasonPhrase = ModelState.GetErrorSummary() }); } var parameters = values.Map().To <CreatePackScheduleParameters>(); _userIdentityProvider.SetUserIdentity(parameters); return(_productionService.CreatePackSchedule(parameters).ToHttpResponseMessage(HttpVerbs.Post)); }