private void btnCadUser_Click(object sender, EventArgs e) { Graph g = new Graph(); UserContextModel ctx = new UserContextModel(); SingletonStarDog dog = SingletonStarDog.getDbInstance(); //ctx.userID = txtAlunoID.Text; //ctx.ComunidadeMoodle = txtAlunoComunidade.Text; HardwareModel device = new HardwareModel(); //device.Device_ID = txtDeviceID.Text; //ctx.DeviceList.Add(device); OntoStudent obj = new OntoStudent(ctx, device); dog.GetDBConnection().Begin(); obj.insertStudent(ref g); dog.GetDBConnection().SaveGraph(g); // obj.insertHasDevice(ref g); dog.GetDBConnection().SaveGraph(g); obj.insertComunidadeMoodle(ref g); dog.GetDBConnection().SaveGraph(g); dog.GetDBConnection().Commit(); Ontology.Ontology.ListAllDevices(txtComunidades.Text); Ontology.Ontology onto2 = new Ontology.Ontology(); onto2.ListAllUserDevice(); }
static void Main(string[] args) { Ontology onto = new Ontology(); }
public void RegisterDeviceforPushNotification(string userID, string deviceToken, string deviceName) { var onto = new Ontology.Ontology(); onto.InsertUserDeviceTokenInDatabase(userID, deviceToken, deviceName); }