public void AddSecurity(int websiteId, string feature, enumSecurity securityLevel) { structSecurity s = new structSecurity(); s.websiteId = websiteId; s.feature = feature; s.security = securityLevel; if ((security == null) == true) security = new List<structSecurity>(); if (security.Exists((structSecurity x) => x.feature == feature & x.websiteId == websiteId) == false) { security.Add(s); } }
public void AddSecurity(int websiteId, string feature, enumSecurity securityLevel) { structSecurity s = new structSecurity(); s.websiteId = websiteId; s.feature = feature; s.security = securityLevel; if ((security == null) == true) { security = new List <structSecurity>(); } if (security.Exists((structSecurity x) => x.feature == feature & x.websiteId == websiteId) == false) { security.Add(s); } }