Exemplo n.º 1
0
        public ICollection <ContactsApplicationMapping> FindByDatiGenerici(ContactsApplicationMapping contact)
        {
            List <ContactsApplicationMapping> listContacts = null;

            using (ContactsApplicationMappingSQLDb dao = new ContactsApplicationMappingSQLDb())
            {
                listContacts = (List <ContactsApplicationMapping>)dao.GetContactsByCriteria(BuildQueryByData(contact));
            }
            return(listContacts);
        }
Exemplo n.º 2
0
        public ICollection <ContactsApplicationMapping> FindByDatiGenerici(ICollection <ContactsApplicationMapping> contacts)
        {
            List <ContactsApplicationMapping> listContacts = new List <ContactsApplicationMapping>();

            using (ContactsApplicationMappingSQLDb dao = new ContactsApplicationMappingSQLDb())
            {
                foreach (ContactsApplicationMapping m in contacts)
                {
                    ICollection <ContactsApplicationMapping> cm = dao.GetContactsByCriteria(BuildQueryByData(m));
                    if (cm != null)
                    {
                        listContacts.AddRange(cm);
                    }
                }
            }
            if (listContacts.Count == 0)
            {
                listContacts = null;
            }
            return(listContacts);
        }