Exemplo n.º 1
0
 public List<sp_ContactEmail_DM> ListContactEmails(Guid? contactid, int? emailid)
 {
     List<sp_ContactEmail_DM> list = new List<sp_ContactEmail_DM>();
     try
     {
         using (VolTeerEntities context = new VolTeerEntities())
         {
             list = (from result in context.sp_ContactEmail_Select(contactid, emailid)
                     select new sp_ContactEmail_DM
                     {
                         ContactID = result.ContactID,
                         EmailID = result.EmailID,
                         PrimaryEmail = result.PrimaryEmail
                     }).ToList();
         }
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     return list;
 }