VideoRentalService.DataFacade1.GetRewardsReport C# (CSharp) Method

GetRewardsReport() public method

public GetRewardsReport ( Nullable min_monthly_purchases, Nullable min_dollar_amount_purchased, int count_rewardees ) : VideoRentalService.SCustomer[]
min_monthly_purchases Nullable
min_dollar_amount_purchased Nullable
count_rewardees int
return VideoRentalService.SCustomer[]
        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();
        }