Пример #1
0
        private Entity RetrieveLogic(string logicalName, Guid id)
        {
            var repo = new WideWorldImportersRepository(SQL, PUBLISHER);
            var task = Task.Run(() => repo.GetById(logicalName, id));

            return(task.Result);
        }
Пример #2
0
        private EntityCollection RetrieveMultipleLogic(QueryExpression qe)
        {
            var collection = new EntityCollection();

            if (qe != null)
            {
                var visitor = new WideWorlImportersQueryVisitor();
                qe.Accept(visitor);

                var repo = new WideWorldImportersRepository(SQL, PUBLISHER);
                var task = repo.Search(qe.EntityName, visitor.SQLCriteria, visitor.Columns, visitor.Count).GetAwaiter().GetResult();
                collection = task;
            }

            return(collection);
        }