来源:MySql.Data.Entity.EF6索引超出了数组

时间:2017-06-24 09:42:12

标签: c# stored-procedures entity-framework-6 mysql.data

来源:MySql.Data.Entity.EF6存储过程生成错误索引超出了数组的范围。

enter image description here

  List<PayRollAllocationList> payroll = db.SP_EmployeePayRoll(orgCode, Medicalallowcode, HouseRentallowcode, HomeLoanInterest, Sect80allowcode, Childallowcode, Mediclaimallowcode, convallowcode, Miscellaneous, fromMonthValue, fromYearValue, toMonthValue, toYearValue, startDateValue, endDateValue)
                .Select(x => new PayRollAllocationList
                {
                    BankAccNo = x.BankAccountNo,
                    BankName = x.BankName,
                    BankIFSCCode = x.BankIFSCCode,
                    estatus = x.Status,
                    PayrollMonth = x.Month,
                    Year = x.Year,
                    EmployeeName = x.EmpoyeeName,
                    Designation = x.Designation,
                    JoiningDate = x.JoiningDate,
                    payconveyance = x.ConveyanceAndInternetReimbursement,
                    PayMedicalAllow = x.MedicalAllowance,
                    PayHouseAllow = x.HouseRentAllowance,
                    PayHomeLoanInterest = x.HomeLoanInterest,
                    PaySectionAllow = x.MonthlyInvestments,
                    Paychildedu = x.ChildrenEducationAllowance,
                    Paymediclaim = x.Mediclaim,
                    ////miscellaneous = db.salarymasters.Where(t => t.ApplicationUserID == x.ApplicationUserID && t.AllowanceTypeID == Miscellaneous && t.IsActive == true && t.applicationuser.organizationmaster.OrganizationCode == orgCode).Select(t => t.Amount) != null ? db.salarymasters.Where(t => t.ApplicationUserID == x.ApplicationUserID && t.AllowanceTypeID == Miscellaneous && t.IsActive == true && t.applicationuser.organizationmaster.OrganizationCode == orgCode).Select(t => t.Amount).Sum() : 0,
                    Paymiscellaneous = x.Miscellaneous,
                    PayBasicSalary = x.Basic,
                    PayIncentive = x.TotalCompensation,
                    PayTDSDeduction = string.IsNullOrEmpty(x.TDS) ? "0" : x.TDS,
                    PayEmployeeESIC = x.EmployeeESIC,
                    PayEmployerESIC = x.EmployerESIC,
                    PayEmployeePF = x.EmployeePF,
                    PayEmployerPF = x.EmployerPF,
                    TotalESIC = (!string.IsNullOrEmpty(x.EmployeeESIC) ? Convert.ToDecimal(x.EmployeeESIC) + (!string.IsNullOrEmpty(x.EmployerESIC) ? Convert.ToDecimal(x.EmployerESIC) : 0) : 0),
                    TotalPF = (!string.IsNullOrEmpty(x.EmployeePF) ? Convert.ToDecimal(x.EmployeePF) + (!string.IsNullOrEmpty(x.EmployerPF) ? Convert.ToDecimal(x.EmployerPF) : 0) : 0),
                    PayProfessionalTax = string.IsNullOrEmpty(x.ProfessionalTax) ? "0" : x.ProfessionalTax,
                    PayNonTaxableAmount = x.TotalNonTaxable,
                    PayTaxableAmount = x.TotalTaxableCompensation,
                    PaysalaryandConv = x.SalaryConveyance,
                    Paytotalcompensation = x.TotalCompensation,
                    PayNetSalary = x.NetPayble,
                    PayprojectIncentive = x.ProjectIncentive,
                    PayOTIncentive = x.OTIncentive,
                    PayAdjustAmt = x.AdjustmentAmount,
                    AdjustDesc = x.AdjustmentDescriptiom,
                    PayLWPAmt = x.LWP,
                }).ToList();

at MySql.Data.Entity.EFMySqlDataReader.GetDataTypeName(Int32 ordinal) atSystem.Data.Entity.Core.Objects.Internal.BufferedDataRecord.ReadMetadata(String providerManifestToken,DbProviderServices providerServices,DbDataReader reader)    在System.Data.Entity.Core.Objects.Internal.ShapedBufferedDataRecord.Initialize(String providerManifestToken,DbProviderServices providerServices,DbDataReader reader,Type [] columnTypes,Boolean [] nullableColumns)    在System.Data.Entity.Core.Objects.Internal.BufferedDataReader.Initialize(String providerManifestToken,DbProviderServices providerServices,Type [] columnTypes,Boolean [] nullableColumns)    at System.Data.Entity.Core.Objects.ObjectContext.CreateFunctionObjectResult [TElement](EntityCommand entityCommand,ReadOnlyCollection 1 entitySets, EdmType[] edmTypes, ExecutionOptions executionOptions) at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass45 1.b__44()    在System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction [T](Func 1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass45 1.b__43()    在System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute [TResult](Func 1 operation) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ExecutionOptions executionOptions, ObjectParameter[] parameters) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ObjectParameter[] parameters) at OMS.omsdbEntities.SP_EmployeePayRoll(String orgCode, Nullable 1 medicalallowcode,Nullable 1 houseRentallowcode, Nullable 1 homeLoanInterest,Nullable 1 sect80allowcode, Nullable 1 childallowcode,Nullable 1 mediclaimallowcode, Nullable 1 convallowcode,Nullable 1 miscellaneous, Nullable 1 fromMonthValue,Nullable 1 fromYearValue, Nullable 1 toMonthValue,Nullable 1 toYearValue, Nullable 1 startDateValue,Nullable`1 endDateValue)在F:\ Pooja \ OMS \ OMS \ OMS \ OMS_data.Context中。 cs:185行    在F:\ Pooja \ OMS \ OMS \ OMS \ Service \ ReportService.cs中的OMS.Service.ReportService.GetPayRollAllocationList():第132行

0 个答案:

没有答案