using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace MaiCore { /// <summary> /// /// </summary> public class L…
网上找的源码,但是博主说有bug 让自己调试.这个是我经过多次修改后的代码,可以直接用 public static class LambdaToSqlHelper { #region 基础方法 #region 获取条件语句方法 private static string GetWhereSql<T>(Expression<Func<T, bool>> func, List<ParMODEL> parModelList) where T : class { s…
select c; ), b=> b.Id, p=> p.BlogId, (b, p) => new {b}); public class Blog { public int Id { get; set; } public string Title { get; set; } } public class Post { public int Id { get; set; } public string Title { get; set; } public int BlogId { get…