/// <summary> /// return new ObjectResponse or message notification /// </summary> /// <param name="result"></param> /// <returns></returns> protected IActionResult Result(object result = null) { try { if (!_notify.IsValid) { return(BadRequest(_notify.GetNotifications())); } if (result == null) { return(Ok()); } return(Ok(result)); } catch (ArgumentException ex) { return(NotFound(ex)); } catch (Exception ex) { return(BadRequest(ex)); } }