private void ExecuteDeleteProfile(Profile profile, bool softDelete) { if (!softDelete) { _profileRepository.Delete(profile); } else { _profileRepository.SoftDelete(profile); } var user = _userRepository.SingleAttached(p => p.Guid == profile.Guid); user.Gender = 0; _userRepository.FullUpdate(user); _katushaGlobalCache.Delete("P:" + profile.Guid.ToString()); _profileRepositoryRaven.Delete(profile); }