随笔分类 - Linq
摘要:1、toTlist()后附加条件转换 db.TB_Log_SMS.ToList().Count(m => m.AddDate.ToShortDateString() == DateTime.Now.ToShortDateString(); 2、EntityFunctions.TruncateTime
阅读全文
摘要:条件如下: 表A(公司表):ID(INT,PK),Name(nvarchar(255)) 表B(用户表):ID(INT,PK),Name(nvarchar(255)),CompanyId(int) 求:表B中CompanyId 在数组中的所有数据。 先创建一个int型数组,个人喜欢先用list再转。
阅读全文
摘要:/// /// 绑定数据 /// private void BindData() { IQueryable query = SelectData(); this.anpList.RecordCount = query.Count(); int curr_page_index = this.an...
阅读全文