Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace WebApi.Infrastructure.Validation
- open System.Net
- open System.Net.Http
- open System.Web.Http.Filters
- type ModelValidationFilterAttribute () =
- inherit ActionFilterAttribute ()
- override this.OnActionExecuting actionContext =
- DeltaOfTEntityTypeValidationProvider.searchAndValidateDelta actionContext
- if not actionContext.ModelState.IsValid then
- actionContext.Response <-
- actionContext.Request.CreateErrorResponse
- (HttpStatusCode.BadRequest, actionContext.ModelState)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement