Esempio n. 1
0
        public async Task SaveData(Base_DbLink theData)
        {
            if (theData.Id.IsNullOrEmpty())
            {
                theData.InitEntity();

                await _dbLinkBus.AddDataAsync(theData);
            }
            else
            {
                await _dbLinkBus.UpdateDataAsync(theData);
            }
        }
        public ActionResult <AjaxResult> SaveData(Base_DbLink theData)
        {
            AjaxResult res;

            if (theData.Id.IsNullOrEmpty())
            {
                theData.InitEntity();

                res = _dbLinkBus.AddData(theData);
            }
            else
            {
                res = _dbLinkBus.UpdateData(theData);
            }

            return(JsonContent(res.ToJson()));
        }