public IEnumerable<Oppertunity> ReadList(String inputParameter) { using (CRMDataClassesDataContext db = new CRMDataClassesDataContext("server=xxx;database=xxx; uid=xxx ;pwd=xxx")) { List<Oppertunity> oppertunities = new List<Oppertunity>(); var q = from c in db.Opportunities where c.Name.Contains(inputParameter) orderby c.Name ascending select new Oppertunity { OppertunityId = c.OpportunityId, Name = c.Name, }; foreach (var o in q) { Oppertunity oppertunity = new Oppertunity(); oppertunity.OppertunityId = o.OppertunityId; oppertunity.Name = o.Name; oppertunities.Add(oppertunity); } } return oppertunities; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)