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; } }
// TODO think of join add and edit methods public void UpdatePool(PoolViewModel poolViewModel) { try { _poolRepository.UpdateAndCommit(poolViewModel.ToPoolModel()); } catch (Exception ex) { _logger.Log(ex); } }