예제 #1
0
 public virtual T GetById(string id)
 {
     return(Dbset.Find(id));
 }
 public Product Find(int productId)
 {
     return(Dbset.Find(productId));
 }
예제 #3
0
        public TEntity BuscarPorId(object id)
        {
            var entity = Dbset.Find(id);

            return(entity);
        }
예제 #4
0
 public User GetById(int?id)
 {
     return(Dbset.Find(id));
 }
예제 #5
0
 /// <summary>
 /// 根据id来获取实体信息
 /// </summary>
 /// <param name="id">实体ID</param>
 /// <returns></returns>
 public Tentity GetById(Guid id)
 {
     return(Dbset.Find(id));
 }
예제 #6
0
 /// <summary>
 /// 根据id删除数据
 /// </summary>
 /// <param name="id"></param>
 public void Remove(Guid id)
 {
     Dbset.Remove(Dbset.Find(id));
 }