Код: Выделить всё
ALTER FUNCTION [dbo].[f_GetCustomValue] (
@Id int
)
RETURNS VARCHAR(MAX)
AS
BEGIN
---some calculation and joins
END
Код: Выделить всё
[Table("Country")]
public partial class Country{
public int Id {get; set;}
public string Name {get;set;}
public string Desc {get; set;}
public string CustomDesc {get; set;} -- here this should be a response from the sql function
}
Код: Выделить всё
public IQueryable GetCountries(dbContext context)
{
return context.Countries;
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... in-ef-core