To Store Multiple Array In a New Array using C# . We have to use ArrayList for it
Lets See How
dynamic arrayList = new ArrayList();
dynamic FirstArrayRecord = _context.ArrayClass.FromSqlRaw("[dbo].[Sp_getCalenderAttendanceJan] @EmployeeID=" + EmployeeID + ",@year=" + year + " ").AsNoTracking().ToList();
dynamic SecondArrayRecord = _context.ArrayClass.FromSqlRaw("[dbo].[Sp_getCalenderAttendanceFeb] @EmployeeID=" + EmployeeID + ",@year=" + year + " ").AsNoTracking().ToList();
Above We Have Two Records i.e FirstArrayRecord and SecondArrayRecord we have to add this record in a new arraylist.
arrayList.Add(FirstArrayRecord );
arrayList.Add(SecondArrayRecord );
return arrayList
In the Last we will return arrayList .
No comments:
Post a Comment