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; }
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); }