Beispiel #1
0
        public List<Company> RetriveCompanyNames()
        {
            StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext();
            var ResultCompanies = dbmlObject.RetreiveCompanies();
            List<Company> list = new List<Company>();
            foreach (var i in ResultCompanies)
            {
                list.Add(new Company
                {
                    CompanyID = i.CompanyID,
                    Name = i.Name

                });
            }
            return list;
        }
Beispiel #2
0
        public List <Company> RetriveCompanyNames()
        {
            StoredProcedureDataContext dbmlObject = new StoredProcedureDataContext();
            var            ResultCompanies        = dbmlObject.RetreiveCompanies();
            List <Company> list = new List <Company>();

            foreach (var i in ResultCompanies)
            {
                list.Add(new Company
                {
                    CompanyID = i.CompanyID,
                    Name      = i.Name
                });
            }
            return(list);
        }