I get data form the DB like this using Breeze promise ExecuteQuery
:
var getdata = function(){
var manager = new breeze.EntityManager(serviceName);
var query = new EntityQuery().from('MyTable');
manager.executeQuery(query)
.then(function(data){
//line1
console.log('success');
});
//line2
console.log('end');
}
Is there any way to make this function synchronous : not executing line2 untill line1 is done (or query failed) ?
Thanks