public new IHttpActionResult CreateOrUpdate([FromBody] PermissionType model) { if (model == null) { return(BadRequest("Permission Type must be provided")); } var permission = permissionService.Read(model.PermissionTypeK); if (permission == null) { permission = permissionService.Create(model); } else { permissionService.Update(permission.PermissionTypeK, model); } return(Ok()); }