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)); } }
public void SaveBarrier(BarrierModel barrierModel) { var barrier = GetBarrierEntity(); if (barrier == null) { _barrierRepository.Add(BarrierMapper.ToEntity(barrierModel)); } else { _barrierRepository.Update(BarrierMapper.ToEntity(barrierModel)); } }
public async Task <BarrierModel> GetBarrierAsync() { return(BarrierMapper.ToModel(await GetBarrierEntityAsync())); }
public BarrierModel GetBarrier() { return(BarrierMapper.ToModel(GetBarrierEntity())); }