Beispiel #1
0
        public APIReturn _Add([FromForm] uint?News_id, [FromForm] uint?Newstag_id)
        {
            News_newstagInfo item = new News_newstagInfo();

            item.News_id    = News_id;
            item.Newstag_id = Newstag_id;
            item            = News_newstag.Insert(item);
            return(APIReturn.成功.SetData("item", item.ToBson()));
        }
Beispiel #2
0
        public News_newstagInfo FlagNews(uint?News_id)
        {
            News_newstagInfo item = News_newstag.GetItem(News_id.Value, this.Id.Value);

            if (item == null)
            {
                item = News_newstag.Insert(new News_newstagInfo {
                    News_id    = News_id,
                    Newstag_id = this.Id
                });
            }
            return(item);
        }