public static HttpServiceResponse AsHttpCreated( this IServiceResponse model, string route, Func <object> getRouteData) { return(model.IsSuccess() ? new HttpServiceResponse( HttpStatusCode.Created, new Dictionary <string, string> { { "location", route.MergeRouteData(getRouteData()) } }, null) : new HttpServiceResponse( null, null, model.Errors)); ; }