public virtual TEntity GetItem(TKey key) { return(Func(v => EFHelper.FindOne <TEntity>(DbQuery(v), key))); }
public virtual List <TEntity> FindAll() { return(Func(v => EFHelper.FindAll <TEntity>(v).ToList())); }
public void InsertOrUpdate(List <TEntity> entity) { Action(v => EFHelper.InsertOrUpdate(v, entity.ToArray())); }
public virtual TEntity Insert(TEntity entity) { return(Func(v => EFHelper.Insert(v, entity))); }
/// <summary> /// 受保护的方法 /// </summary> /// <param name="entity"></param> public virtual void Update(TEntity entity) { Action(v => EFHelper.Update(v, entity)); }
public virtual void Delete(TKey id) { Action(v => EFHelper.Delete <TKey, TEntity>(v, id)); }