· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Play Framework/Migrate FromASPNET

Microsoft Entity Framework 과의 비교표

SQL EF 4.0 Play JPA
N/A IQueryable<T> JPAQuery
SELECT * FROM TableName.ToList() *.findAll()
SELECT * FROM TableName WHERE Name = 'FullName'.Where(m => m.Name == "FullName").find("byName", "FullName")
SELECT * FROM TableName WHERE Name LIKE '%MiddleName%'.Where(m => m.Name.Contains("MiddleName")).find("byNameLike", "%MiddleName%")
SELECT * FROM TableName WHERE Name LIKE 'MiddleName%'.Where(m => m.Name.StartsWith("MiddleName")).find("byNameLike", "MiddleName%")
SELECT * FROM TableName WHERE Name LIKE '%MiddleName'.Where(m => m.Name.EndsWith("MiddleName")).find("byNameLike", "%MiddleName")
SELECT * FROM TableName WHERE Name IS NULL.Where(m => m.Name == null).find("byNameIsNull")
SELECT * FROM TableName LIMIT 0, 100.Take(100).fetch(100)
SELECT * FROM TableName LIMIT 50, 50.Skip(50).Take(50).from(50).fetch(50)
SELECT * FROM TableName LIMIT 0, 10.First().first()
N/A .Single() N/A
SELECT COUNT(*) FROM TableName.Count().count()

* ToList()는 엄밀히 말해 전체 내용을 가져오는 함수는 아니지만, 대응되는 EF 메서드가 없어 삽입했다.




sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2011-08-30 00:23:17
Processing time 0.0048 sec