Esempio n. 1
0
 public IEnumerable <Table> GetTables()
 {
     return(from e in _metadata.Value.EntityContainers
            where e.IsDefaulEntityContainer
            from s in e.EntitySets
            select new Table(s.Name, Schema.Get(_urlBase)));
 }
Esempio n. 2
0
 private SchemaProvider(string urlBase, string metadataString)
 {
     if (!string.IsNullOrEmpty(metadataString))
     {
         _metadataString = new Lazy <string>(() => metadataString);
     }
     else
     {
         _metadataString = new Lazy <string>(() => RequestMetadataAsString(urlBase));
     }
     _metadata = new Lazy <EdmSchema>(() => ODataHelper.GetSchema(_metadataString.Value));
     _schema   = new Lazy <Schema>(() => Schema.Get(this));
 }