public async Task <IActionResult> AddAsync() { Dictionary <string, object> data = await GetPostDataAsync(); if (data.Count < 1) { return(Json(new WebApiResult <object> { code = ResultCode.MISSING_ARGUMENT, message = "未提交记录的数据." })); } TestDataItemService service = DataService.Get <TestDataItemService>(dbCollection.Current); service.Add(data, service.ItemsTable); return(Json(new WebApiResult <object> { code = ResultCode.STATE_OK, message = string.Empty })); }