/// <summary> /// /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool AddEntity(T entity) { dbContext.Set <T>().Add(entity); bool res = dbContext.SaveChanges() > 0 ? true : false; return(res); }
public BaseDal(ShareContext context) { dbContext = context; _dbSet = context.Set <T>(); }