VideoRentalService.DataFacade1.GetCustomersByText C# (CSharp) Method

GetCustomersByText() public method

public GetCustomersByText ( string searchtext ) : VideoRentalService.SCustomer[]
searchtext string
return VideoRentalService.SCustomer[]
        public override SCustomer[] GetCustomersByText(string searchtext)
        {
            List<SCustomer> scustomerlist = new List<SCustomer>();

            simulator.PerformanceSimulation();

            using (SakilaEntities dc = new SakilaEntities())
            {
                var model = from c in dc.customers
                            where c.first_name.Contains(searchtext) || c.last_name.Contains(searchtext)
                            orderby (c.first_name)
                            select c;
                List<customer> contactList = model.ToList<customer>();
                for (int i = 0; i < contactList.Count; i++)
                {
                    SCustomer scustomer = new SCustomer();
                    scustomer = scustomer.Createcustomer(contactList[i].customer_id, contactList[i].store_id, contactList[i].first_name, contactList[i].last_name, contactList[i].address_id, contactList[i].active, contactList[i].create_date, contactList[i].last_update, contactList[i].email);
                    scustomerlist.Add(scustomer);
                }
            }
            return scustomerlist.ToArray<SCustomer>();
        }