public ActionResult <IEnumerable <Cart> > Get() { try { return(Ok(_cs.Get())); } catch (UnauthorizedAccessException e) { return(Unauthorized(e.Message)); } catch (Exception e) { return(BadRequest(e.Message)); } }