Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このクエリを MySQL から LINQ に変換するにはどうすればよいですか?
SELECT SUM(IF(x>0, c*(x/100),20.00)) AS x1 FROM tablename WHERE uid="some value" AND name='some value';
var sum = testlist.Where(item => item.name == "somevalue" && item.uid == "somevalue") .Sum(c => c.x > 0 ? c.c*(c.x/100) : 20);
これを試して
このツールを試してください。
http://softwaretopic.informer.com/sql-to-linq-converter-online-free/