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; }
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); }