Example #1
0
        public async Task <bool> DeleteEntityDeepAsync(UserDto entity)
        {
            var userEntity = _mapper.Map <User>(entity);
            var findrecord = await _recordRepository.FindEntitySallowAsync(userEntity.UserId);

            if (findrecord != null)
            {
                await _recordRepository.DeleteEntityDeepAsync(findrecord);
            }
            _patientContext.User.Remove(userEntity);
            return(await this.SaveChangesAsync());
        }