VideoRentalService.DataFacade1.GetCustomer C# (CSharp) Method

GetCustomer() public method

public GetCustomer ( int id ) : SCustomer
id int
return SCustomer
        public override SCustomer GetCustomer(int id)
        {
            using (SakilaEntities dc = new SakilaEntities())
            {
                var model = from c in dc.customers
                            where c.customer_id == id
                            orderby (c.first_name)
                            select c;
                List<customer> contactList = model.ToList<customer>();
                if (contactList.Count > 0)
                {
                    SCustomer scustomer = new SCustomer();
                    simulator.PerformanceSimulation();
                    scustomer = scustomer.Createcustomer(contactList[0].customer_id, contactList[0].store_id, contactList[0].first_name, contactList[0].last_name, contactList[0].address_id, contactList[0].active, contactList[0].create_date, contactList[0].last_update, contactList[0].email);
                    return scustomer;
                }
            }
            throw new Exception("no data found");
        }