public static string Gen(ISQLContext sqlContext, Type t) { var sql = GetGenTblSql(t); sqlContext.ExecuteSQL(sql); return(sql); }
/// <summary> /// 请先创建好数据库,然后依据程序集生成所有表 /// </summary> /// <param name="assembly"></param> /// <param name="context"></param> /// <returns></returns> public static void Gen(Assembly assembly, ISQLContext context) { var types = assembly.GetTypes(); foreach (var type in types) { var b = type.BaseType; if (b != null && b.FullName.Contains("BaseEntity")) { GenTbl.Gen(context, type); } } }
public static ICompositeQuery AsCompositeQuery(this ISQLContext context) { ICompositeQuery query = new CompositeQuery(context); return(query); }
public CompositeQuery(ISQLContext context) { _context = context; }
public static string Gen <T>(ISQLContext sqlContext) where T : BaseEntity <T>, new() { return(Gen(sqlContext, typeof(T))); }
public PlayerRepository(ISQLContext context) : base(context) { }
public SqlServerQueryExecutor(ISQLContext provider, string tblName) { this.provider = provider; _tblName = tblName; }
protected BaseRepository(ISQLContext context) { _context = context; DbSet = _context.GetCollection <TEntity>(); }
public UnitOfWork(ISQLContext context, IMapper mapper) { _context = context; _mapper = mapper; }