public MarketdescInfo Save() { if (this.Market_id != null) { Marketdesc.Update(this); return(this); } return(Marketdesc.Insert(this)); }
public APIReturn _Edit([FromQuery] uint Market_id, [FromForm] string Content, [FromForm] string Url) { MarketdescInfo item = Marketdesc.GetItem(Market_id); if (item == null) { return(APIReturn.记录不存在_或者没有权限); } item.Content = Content; item.Url = Url; int affrows = Marketdesc.Update(item); if (affrows > 0) { return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}")); } return(APIReturn.失败); }