Hi All,
How get the multiple select query in stored procedure using dot net core using by genric repository.
i using below code to bind details , and using stored Procedure , its was worked stored procedure contain single select query . but when using multple select query in stored procedure its return only one select query result , neet to get all the select Query result ,
ALTER PROC [dbo].[usp_GetClientForProject]
AS BEGIN
SELECT ClientId AS ClientId,[ClientName] AS ClientName , IsActive,IsDeleted
FROM [dbo].[ClientMaster]
-- WHERE IsActive=1
SELECT [BillingCycleID] AS BillingCycleId ,[BillingCycleName] AS BillingCycleName FROM BillingCycle
END
public async Task<List<ClientSelectListItem>> GetClientForProject()
{
try
{
Parameters = new GenericParameter
{
ExecuteType = CommandType.StoredProcedure
};
Parameters.SqlCommand = StoredProcedure.GetClientForProject;
var Result = await _repository.ExecuteQueryListAsync<ClientSelectListItem>(Parameters);
return Result?.ToList();
}
catch (Exception ex)
{
Logger.Log.Error(ex, "GetClientDetailsForProject");
return null;
}
}