Microsoft.Data.Sqlite 2.1 منتشر شد
نویسنده: وحید نصیری
تاریخ: ۱۳۹۷/۰۳/۱۰ ۸:۴۲
آدرس: www.dntips.ir
// User-defined functions
connection.CreateFunction(
"volume",
(double radius, double height)
=> Math.PI * Math.Pow(radius, 2) * height);
// And use the function in SQL to find the biggest cylinder.
SELECT id, volume(radius, height) AS volume
FROM cylinder
ORDER BY volume DESC
LIMIT 1