資源簡介
entity framework code first封裝好的操作helper類(sqlserver版本),支持增刪改查操作,支持批量增刪改,支持執(zhí)行sql語句,可執(zhí)行的完整demo可以下載我的另外一個資源進(jìn)行參考。
代碼片段和文件信息
using?Entityframework.Extensions;
using?System;
using?System.Collections.Generic;
using?System.Data.SqlClient;
using?System.Linq;
using?System.Linq.expressions;
using?System.Text;
using?System.Transactions;
namespace?efdemo
{
????public?class?ContentHelp
????{
????????///?
????????///?根據(jù)條件查詢list集合
????????///?
????????///?
????????///?查詢條件
????????///?
????????public?List?GetListByConditions(expression>?where)?where?T?:?class
????????{
????????????using?(var?db?=?new?ttContent())
????????????{
????????????????return?db.Set().Where(where).ToList();
????????????}
????????}
????????///?
????????///?查詢集合
????????///?
????????///?
????????///?
????????public?List?GetList()?where?T?:?class
????????{
????????????using?(var?db?=?new?ttContent())
????????????{
???
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????9435??2017-02-04?15:36??ContentHelp.cs
- 上一篇:QPBO和DD算法對比的中文報告
- 下一篇:MUSIC算法估計功率譜
評論
共有 條評論