| | |
| | | { |
| | | return await Task.Factory.StartNew(() => |
| | | { |
| | | var model = input.Adapt<AddAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMap>(); |
| | | var model = input.Adapt<AddAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMapping>(); |
| | | var id = _service.Insert(model); |
| | | return id; |
| | | }); |
| | |
| | | { |
| | | return await Task.Factory.StartNew(() => |
| | | { |
| | | var list = inputList.Select(x => x.Adapt<AddAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMap>()).ToList(); |
| | | var list = inputList.Select(x => x.Adapt<AddAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMapping>()).ToList(); |
| | | var bol = _service.Inserts(list); |
| | | return bol; |
| | | }); |
| | |
| | | throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 数据不存在"); |
| | | } |
| | | |
| | | var rhs = new Model.AssetsCompressorMainAndPartMap(model); |
| | | var rhs = new Model.AssetsCompressorMainAndPartMapping(model); |
| | | input.Adapt(rhs); |
| | | var bol = _service.Update(rhs); |
| | | return bol; |
| | |
| | | { |
| | | return false; |
| | | } |
| | | var list = inputList.Select(x => x.Adapt<UpdateAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMap>()).ToList(); |
| | | var list = inputList.Select(x => x.Adapt<UpdateAssetsCompressorMainAndPartMapInput, Model.AssetsCompressorMainAndPartMapping>()).ToList(); |
| | | var bol = _service.Updates(list); |
| | | return bol; |
| | | }); |