VideoRentalService.SCustomer.Createcustomer C# (CSharp) Method

Createcustomer() public method

public Createcustomer ( global customer_id, global store_id, global first_name, global last_name, global address_id, global active, global create_date, global last_update, string email ) : SCustomer
customer_id global
store_id global
first_name global
last_name global
address_id global
active global
create_date global
last_update global
email string
return SCustomer
        public SCustomer Createcustomer(global::System.Int32 customer_id, global::System.Byte store_id, global::System.String first_name, global::System.String last_name, global::System.Int32 address_id, global::System.Boolean active, global::System.DateTime create_date, global::System.DateTime last_update, string email)
        {
            SCustomer customer = new SCustomer();
            customer.customer_id = customer_id;
            customer.store_id = store_id;
            customer.first_name = first_name;
            customer.last_name = last_name;
            customer.address_id = address_id;
            customer.active = active;
            customer.create_date = create_date;
            customer.last_update = last_update;
            customer.email = email;
            return customer;
        }

Usage Example

        public override SCustomer[] GetRewardsReport(
            Nullable <global::System.SByte> min_monthly_purchases,
            Nullable <global::System.Decimal> min_dollar_amount_purchased,
            int count_rewardees)
        {
            List <SCustomer> scustomerList = new List <SCustomer>();

            using (SakilaEntities entitities = new SakilaEntities())
            {
                ObjectParameter cntRewardees = new ObjectParameter("count_rewardees", count_rewardees);
                List <customer> contactList  = entitities.GetRewardsReport(min_monthly_purchases.Value, min_dollar_amount_purchased.Value, cntRewardees).ToList <customer>();
                count_rewardees = (int)cntRewardees.Value;

                simulator.PerformanceSimulation();

                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());
        }
All Usage Examples Of VideoRentalService.SCustomer::Createcustomer