Пример #1
0
        public ICollection <ContactsApplicationMapping> FindByDatiGenerici(ContactsApplicationMapping contact)
        {
            List <ContactsApplicationMapping> listContacts = null;

            using (IContactsApplicationMappingDao dao = getDaoContext().DaoImpl.ContactsApplicationMappingDao)
            {
                listContacts = (List <ContactsApplicationMapping>)dao.GetContactsByCriteria(BuildQueryByData(contact));
            }
            return(listContacts);
        }
Пример #2
0
        public ICollection <ContactsApplicationMapping> FindByDatiGenerici(ICollection <ContactsApplicationMapping> contacts)
        {
            List <ContactsApplicationMapping> listContacts = new List <ContactsApplicationMapping>();

            using (IContactsApplicationMappingDao dao = getDaoContext().DaoImpl.ContactsApplicationMappingDao)
            {
                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);
        }