示例#1
0
        protected override void Seed(QueryingContext context)
        {
            var executor = new SqlBatchExecutor(new SqlParser(), new SqlExecutor(context.Database.Connection));

            executor.ExecuteFromEmbeddedResource(Assembly.GetExecutingAssembly(), "Querying.Seed.sql");
            base.Seed(context);
        }
示例#2
0
 private static void ExecuteResources(DbContext context, IEnumerable <string> resources)
 {
     foreach (var resource in resources)
     {
         SqlBatchExecutor.ExecuteResourceStreamFromExecutingAssembly(context, resource);
     }
 }