public ResponseData <int> SaveInterest(SaveInterest savableData)
        {
            ResponseData <int> resp = new ResponseData <int>();

            try
            {
                InterestFacade facade = new InterestFacade();
                facade.Save(savableData);
            }
            catch (Exception ex)
            {
                ExceptionHandlerFactory.Factory.GetResponseExceptionHandler(resp).Handle(ex);
            }

            return(resp);
        }
Exemple #2
0
        public int Save(SaveInterest savableObj)
        {
            var dal = new InterestDal()
            {
                Id   = savableObj.Id,
                Name = savableObj.Name,
            };

            if (savableObj.Id == default(int))
            {
                return(_repository.Insert(dal));
            }

            _repository.Update(dal);

            return(0);
        }