示例#1
0
 public async Task CreateOrEdit(CreateOrEditStationDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
示例#2
0
        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
        protected virtual async Task Update(CreateOrEditStationDto input)
        {
            var station = await _stationRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, station);
        }