protected IActionResult NewResponse <T>(EntityResponse <T> response) { if (response.HasErrors()) { return(StatusCode(400, response)); } else { return(Ok(response)); } }