예제 #1
0
        public int DeleteProfiles(List<UserProfile> Profiles)
        {
            IUserProfileService _service = new UserProfileService(_SessionFactoryConfigPath);
            int ret = 0;
            foreach (UserProfile _profile in Profiles)
            {
                if (_profile.ProfileID > 0)
                {
                    try
                    {
                        _service.Delete(_profile);
                        ret++;
                    }
                    catch (Exception ex) { }
                }
            }

            _service.CommitChanges();
            return ret;
        }
예제 #2
0
        public int DeleteProfiles(List <UserProfile> Profiles)
        {
            IUserProfileService _service = new UserProfileService(_SessionFactoryConfigPath);
            int ret = 0;

            foreach (UserProfile _profile in Profiles)
            {
                if (_profile.ProfileID > 0)
                {
                    try
                    {
                        _service.Delete(_profile);
                        ret++;
                    }
                    catch (Exception ex) { }
                }
            }

            _service.CommitChanges();
            return(ret);
        }