예제 #1
0
        public Strategy UpdateStrategy(Strategy strategy)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                IStrategyRepository strategyRepository = _DataRepositoryFactory.GetDataRepository <IStrategyRepository>();

                Strategy updatedEntity = null;

                if (strategy.StrategyID == 0)
                {
                    updatedEntity = strategyRepository.Add(strategy);
                }
                else
                {
                    updatedEntity = strategyRepository.Update(strategy);
                }

                return updatedEntity;
            }));
        }