예제 #1
0
        public PoolViewModel CreatePool(PoolViewModel poolViewModel)
        {
            try
            {
                // TODO seems like redundant conversions here
                var entity = poolViewModel.ToPoolModel();
                _poolRepository.UpdateAndCommit(entity);

                _activityHelperService.CreateAddedPoolActivity(entity);

                return entity.ToPoolViewModel();
            }
            catch (Exception ex)
            {
                _logger.Log(ex);
                return null;
            }
        }
예제 #2
0
 // TODO think of join add and edit methods
 public void UpdatePool(PoolViewModel poolViewModel)
 {
     try
     {
         _poolRepository.UpdateAndCommit(poolViewModel.ToPoolModel());
     }
     catch (Exception ex)
     {
         _logger.Log(ex);
     }
 }