Пример #1
0
        public IHttpActionResult Delete([FromUri] int item, [FromUri()] int user)
        {
            BasketConn dbConn = new BasketConn();

            return(Ok(dbConn.deleteItem(item, user)));
        }
Пример #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)));
        }
Пример #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)));
        }
Пример #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
        }
Пример #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
        }
Пример #6
0
        public IHttpActionResult Get()// get the store table
        {
            BasketConn dbConn = new BasketConn();

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