Esempio n. 1
0
 public void PostSchema(Schema schema)
 {
     if (Contain(schema.SchemaID))
     {
         throw new SchemaAlreadyExistException();
     }
     _gorillaCtx.Schemas.Add(schema);
     _gorillaCtx.SaveChanges();
 }
Esempio n. 2
0
 public SchemaManager()
 {
     _gorillaCtx = new MSGorillaContext();
     Schema defaultSchema = _gorillaCtx.Schemas.Find("none");
     if (defaultSchema == null)
     {
         defaultSchema = new Schema("none", "");
         _gorillaCtx.Schemas.Add(defaultSchema);
         _gorillaCtx.SaveChanges();
     }
 }
Esempio n. 3
0
 public Schema PostSchema(string schemaID, string schemaContent)
 {
     Schema schema = new Schema(schemaID, schemaContent);
     _schemaManager.PostSchema(schema);
     return schema;
 }