usp_GetTotalIncomesBySupplierNameAndPeriod() public method

public usp_GetTotalIncomesBySupplierNameAndPeriod ( string supplierName, Nullable startDate, Nullable endDate ) : ObjectResult>
supplierName string
startDate Nullable
endDate Nullable
return ObjectResult>
        static decimal? GetTotalIncomes(string supplierName, DateTime? startDate, DateTime? endDate)
        {
            using (NorthwindEntities northwindEntites = new NorthwindEntities())
            {
                var totalIncomesSet = northwindEntites
                    .usp_GetTotalIncomesBySupplierNameAndPeriod(supplierName, startDate, endDate);

                foreach (var totalIncomes in totalIncomesSet)
                {
                    return totalIncomes;
                }
            }

            return null;
        }