コード例 #1
0
        public sp_VendEmail_DM ListEmails(int EmailID)
        {
            List<sp_VendEmail_DM> list = new List<sp_VendEmail_DM>();
            try
            {
                using (VolTeerEntities context = new VolTeerEntities())
                {
                    list = (from result in context.sp_Vend_Email_Select(EmailID,true)
                            select new sp_VendEmail_DM
                            {
                                EmailID = result.EmailID,
                                EmailAddr = result.EmailAddr,
                                ActiveFlg = result.ActiveFlg
                            }).ToList();
                } // Guaranteed to close the Connection
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return list.FirstOrDefault();
        }