Ejemplo n.º 1
0
        public IHttpActionResult Delete([FromUri] int item, [FromUri()] int user)
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.deleteItem(item, user)));
        }
Ejemplo n.º 2
0
        public IHttpActionResult Put([FromUri] int item, [FromUri()] int user, [FromUri()] int amount)
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.changeItemAmount(item, user, amount)));
        }
Ejemplo n.º 3
0
        public IHttpActionResult Post([FromUri] int item, [FromUri()] int user, [FromUri()] int amount)
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.setItem(item, user, amount)));
        }
Ejemplo n.º 4
0
        public IHttpActionResult GetItemExistance(int item, int user)// get the basket table of the true of false, depending on existance of itemId
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.getExist(item, user)));// need to do: try and catch
        }
Ejemplo n.º 5
0
        public IHttpActionResult Get(int id)// get the basket table of the user with id
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.getItems(id)));// need to do: try and catch
        }
Ejemplo n.º 6
0
        public IHttpActionResult Get()// get the store table
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.getStore()));// need to do: try and catch
        }