public static Models.AddressBookEntryInfo GetEntry(int addressId)
        {
            var entry = Sql.Populate <Models.AddressBookEntryInfo>(
                "AddressBook_GetEntry",
                new Dictionary <string, object>()
            {
                { "addressId", addressId }
            }
                ).FirstOrDefault();

            if (entry != null)
            {
                var fields = AddressFields.GetValues(addressId);
                if (fields != null)
                {
                    entry.fields = fields;
                }
                return(entry);
            }
            return(null);
        }
        public static Models.AddressBookEntryInfo GetEntry(int teamId, string email)
        {
            var entry = Sql.Populate <Models.AddressBookEntryInfo>(
                "AddressBook_GetEntryByEmail",
                new Dictionary <string, object>()
            {
                { "teamId", teamId },
                { "email", email }
            }
                ).FirstOrDefault();

            if (entry != null)
            {
                var fields = AddressFields.GetValues(entry.addressId);
                if (fields != null)
                {
                    entry.fields = fields;
                }
                return(entry);
            }
            return(null);
        }