Esempio n. 1
0
        public List<sp_VendAddress_DM> ListAddresses(int AddrID)
        {
            List<sp_VendAddress_DM> list = new List<sp_VendAddress_DM>();
            try
            {
                using (VolTeerEntities context = new VolTeerEntities())
                {
                    list = (from result in context.sp_Vend_Address_Select(AddrID)
                            select new sp_VendAddress_DM
                            {
                                AddrID = result.AddrID,
                                AddrLine1 = result.AddrLine1,
                                AddrLine2 = result.AddrLine2,
                                AddrLine3 = result.AddrLine3,
                                City = result.City,
                                St = result.St,
                                Zip = result.Zip,
                                Zip4 = result.Zip4,
                                ActiveFlg = result.ActiveFlg
                            }).ToList();
                } // Guaranteed to close the Connection
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return list;
        }