В настоящее время я закодировал GET из хранимых процедур с использованием C#. . Этот пример взят из хранимой процедуры:
Код: Выделить всё
returnValue = _dbContext.Table1.FromSqlInterpolated(sqlCommand).ToList();
Код: Выделить всё
List GetAllCustomers = await _dbContext.Table1!.ToListAsync();
Код: Выделить всё
// Filter query for the customer.
IEnumerable getQuery =
from recs in await this.GetAllCustomers()
where (recs.UID_CUSTOMER == pUID_CUSTOMER)
select recs;
// Fetch the data
return getQuery.ToList();
Код: Выделить всё
// Initialize.
string storedProcName = "dbo.uspGetTable1ForAnyDefects";
string param1 = $"@CustomerUID = {pUID_CUSTOMER}";
string param2 = $"@INT_SEVERITY = {pSEVERITY}";
FormattableString uspCommand = $"EXEC {storedProcName} {param1}, {param2}";
returnValue = _dbContext.TMvwMOTripList.FromSqlInterpolated(command).ToList();
Ваши комментарии добро пожаловать. Спасибо... Джон Д.
Подробнее здесь: https://stackoverflow.com/questions/788 ... cords-from