コード例 #1
0
ファイル: StationsAppService.cs プロジェクト: musdq/ticketer
 public async Task CreateOrEdit(CreateOrEditStationDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
コード例 #2
0
ファイル: StationsAppService.cs プロジェクト: musdq/ticketer
        protected virtual async Task Create(CreateOrEditStationDto input)
        {
            var station = ObjectMapper.Map <Station>(input);


            if (AbpSession.TenantId != null)
            {
                station.TenantId = (int)AbpSession.TenantId;
            }


            await _stationRepository.InsertAsync(station);
        }
コード例 #3
0
ファイル: StationsAppService.cs プロジェクト: musdq/ticketer
        protected virtual async Task Update(CreateOrEditStationDto input)
        {
            var station = await _stationRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, station);
        }