Пример #1
0
        public List<sp_VendorAddr_DM> ListAllAddresses(Guid VendorID)
        {
            List<sp_VendorAddr_DM> list = new List<sp_VendorAddr_DM>();
            try
            {
                using (VolTeerEntities context = new VolTeerEntities())
                {
                    list = (from result in context.sp_VendorAddr_Select(VendorID)
                            select new sp_VendorAddr_DM
                            {
                                AddrID = result.AddrID,
                                VendorID = result.VendorID,
                                HQ = result.HQ
                            }).ToList();
                } // Guaranteed to close the Connection
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return list;
        }