public ActionResult Archive( [FromServicesAttribute] IErrorRepository _errorrepository, [FromRoute] int id) { var logerrobyid = _errorrepository.Archive(id); if (logerrobyid.Success == false) { return(BadRequest(logerrobyid)); } return(Ok(logerrobyid)); }