예제 #1
0
        public async Task SaveBarrierAsync(BarrierModel barrierModel)
        {
            var barrier = await GetBarrierEntityAsync();

            if (barrier == null)
            {
                await _barrierRepository.AddAsync(BarrierMapper.ToEntity(barrierModel));
            }
            else
            {
                await _barrierRepository.UpdateAsync(BarrierMapper.ToEntity(barrierModel));
            }
        }
예제 #2
0
        public void SaveBarrier(BarrierModel barrierModel)
        {
            var barrier = GetBarrierEntity();

            if (barrier == null)
            {
                _barrierRepository.Add(BarrierMapper.ToEntity(barrierModel));
            }
            else
            {
                _barrierRepository.Update(BarrierMapper.ToEntity(barrierModel));
            }
        }
예제 #3
0
 public async Task <BarrierModel> GetBarrierAsync()
 {
     return(BarrierMapper.ToModel(await GetBarrierEntityAsync()));
 }
예제 #4
0
 public BarrierModel GetBarrier()
 {
     return(BarrierMapper.ToModel(GetBarrierEntity()));
 }