What can I do to dynamically create queries when I do have this type of string ?
I want to transform this :
SELECT [Extent1].[TASK_ORDER] AS [TASK_ORDER] FROM [dbo].[CR_TASK] AS [Extent1]
to this :
context.CR_TASK.Where(a => a.TASK_NO == id).Select(a => a.TASK_NO);
您可以轻松使用动态linq ( http://dynamiclinq.codeplex.com/ ),它能够对linq和字符串执行所有动态操作
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.