public __BizAuthModel Register([FromBody] __BizAuthModel authInfo) { if (ModelState.IsValid) { //... do whatever } throw new HttpResponseException(HttpStatusCode.BadRequest); }
public __BizAuthModel Login([FromBody] __BizAuthModel authInfo) { if (ModelState.IsValid) { //... do whatever } throw new HttpResponseException(HttpStatusCode.Forbidden); }