Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
尝试 DbExtensions,可用作 NuGet 包。
Try DbExtensions, available as NuGet package.
我能够找到一个非常好的库来在 .Net 中创建动态 sql。
http://dynasql.codeplex.com/documentation
I was able to find a very good library for creating dynamic sql in .Net.
据我所知(尽管这并不意味着绝对不存在)。
实体框架怎么样?它允许构建查询并将其转换为针对实体的 SQL:
customers.OrderBy(c => c.Name).Skip(10).Take(20)
生成:
SELECT value c FROM NW.Customers AS c ORDER BY c.Name skip 10 limit 20;
Not that I am aware of (although that doesn't mean there definitely isn't).
What about Entity Framework? It allows the query to be built up and translates that to SQL against entities:
Generates:
Linq-to-Sql 有什么问题吗?
var dc = new YourDataContext(); var query = dc.TableName.Where(x=>x.MatchesYourPredicate); Console.WriteLine(dc.GetCommand(query).CommandText);
Anything wrong with Linq-to-Sql?
我总是构建自己的......它既快速又简单,而且您不必依赖第三方库。另外,它还可以帮助您更加熟悉 SQL。
I always build my own... it's quick and easy and you don't have to rely on 3rd-party libraries. Plus it helps you become that little bit more intimate with SQL.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(5)
尝试 DbExtensions,可用作 NuGet 包。
Try DbExtensions, available as NuGet package.
我能够找到一个非常好的库来在 .Net 中创建动态 sql。
http://dynasql.codeplex.com/documentation
I was able to find a very good library for creating dynamic sql in .Net.
http://dynasql.codeplex.com/documentation
据我所知(尽管这并不意味着绝对不存在)。
实体框架怎么样?它允许构建查询并将其转换为针对实体的 SQL:
生成:
Not that I am aware of (although that doesn't mean there definitely isn't).
What about Entity Framework? It allows the query to be built up and translates that to SQL against entities:
Generates:
Linq-to-Sql 有什么问题吗?
Anything wrong with Linq-to-Sql?
我总是构建自己的......它既快速又简单,而且您不必依赖第三方库。另外,它还可以帮助您更加熟悉 SQL。
I always build my own... it's quick and easy and you don't have to rely on 3rd-party libraries. Plus it helps you become that little bit more intimate with SQL.