コード例 #1
0
        public async Task <ActionResult <Lists> > AddList([FromBody] Lists model)
        {
            var _list = new Lists
            {
                LISTID    = -1,
                ListTitle = model.ListTitle,
                USERID    = model.USERID
            };

            var result = await _lists.AddList(_list);

            if (result == null)
            {
                return(BadRequest("Record is not inserted 1"));
            }

            if (result.LISTID == -1)
            {
                return(BadRequest("Record is not inserted 2"));
            }

            return(await Task.FromResult(result));
        }