예제 #1
0
 public async Task CreateOrEdit(CreateOrEditAssetNotesDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
예제 #2
0
        protected virtual async Task Create(CreateOrEditAssetNotesDto input)
        {
            var assetNotes = ObjectMapper.Map <AssetNote>(input);

            if (AbpSession != null)
            {
                assetNotes.TenantId = (int?)AbpSession.TenantId;
                assetNotes.UserId   = AbpSession?.UserId;
            }

            await _assetNotesRepository.InsertAsync(assetNotes);
        }
예제 #3
0
        protected virtual async Task Update(CreateOrEditAssetNotesDto input)
        {
            var assetNotes = await _assetNotesRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, assetNotes);
        }