Beispiel #1
0
        private bool AddOrUpdateCycleUse(riderDto riderDto)
        {
            bool blReturn = true;

            try
            {
                RiderCycleUse cycleUse = riderDto.cycleUse;
                cycleUse.UserId = riderDto.Id;

                var dbValue = GetCycleUseById(riderDto.Id);

                blReturn = (dbValue == null) ? _riderRepository.AddRiderCycleUseToDatabase(cycleUse) : _riderRepository.EditObjectInDatabase(dbValue, cycleUse);
            }

            catch (Exception ex)
            {
            }

            return(blReturn);
        }