示例#1
0
        public async Task <TData <string> > SaveForm(CodeTempletEntity entity)
        {
            var obj = new TData <string>();
            await _codeTempletService.SaveForm(entity);

            obj.Data = entity.Id.ParseToString();
            obj.Tag  = 1;
            return(obj);
        }
 public async Task SaveForm(CodeTempletEntity entity)
 {
     if (entity.Id.IsNullOrZero())
     {
         // 默认赋值
         entity.Id = IdGeneratorHelper.Instance.GetId();
         ;
         await _codeTempletEntityDB.InsertNowAsync(entity);
     }
     else
     {
         // 默认赋值
         await _codeTempletEntityDB.UpdateNowAsync(entity, ignoreNullValues : true);
     }
 }
示例#3
0
        public async Task <TData <string> > SaveFormJson([FromForm] CodeTempletEntity entity)
        {
            var obj = await _codeTempletBLL.SaveForm(entity);

            return(obj);
        }