예제 #1
0
        public override List <ExplorerItem> GetSchema(IConnectionInfo r, Type t)
        {
            List <ExplorerItem> schema = EntityFrameworkHelper.GetSchema(t);

            if ((from ei in schema
                 where ei.Kind == ExplorerItemKind.QueryableObject
                 select ei).All <ExplorerItem>(ei => ei.Children.Count == 0))
            {
                try
                {
                    ObjectContext objectContext = Activator.CreateInstance(t, this.GetContextConstructorArguments(r)) as ObjectContext;
                    if (objectContext != null)
                    {
                        return(EntityFrameworkEdmReader.GetSchema(objectContext));
                    }
                }
                catch
                {
                }
            }
            return(schema);
        }
예제 #2
0
 public override void ExecuteESqlQuery(IConnectionInfo cxInfo, string query)
 {
     EntityFrameworkHelper.ExecuteESqlQuery(this.GetCxStringForESql(cxInfo), query);
 }