Esempio n. 1
0
        public async Task <IActionResult> CreateAsync(IFormCollection forms, Int32 appTypeId = 0)
        {
            #region 参数验证
            Check.IfNullOrZero(forms);
            #endregion

            var appTypeDto = WrapperAppTypeDto(forms);
            if (appTypeId == 0)
            {
                await _appServices.CreateNewAppTypeAsync(appTypeDto);
            }
            else
            {
                await _appServices.ModifyAppTypeAsync(appTypeDto, appTypeId);
            }

            return(Json(new ResponseSimple
            {
                IsSuccess = true,
                Message = "app类型创建成功"
            }));
        }