Exemplo n.º 1
0
 // /facts/query
 public IHttpActionResult ProcessQuery(FactDO query)
 {
     using (var uow = ObjectFactory.GetInstance <IUnitOfWork>())
     {
         var facts = _fact.GetByObjectId(uow, query.ObjectId);
         return(Ok(facts.Select(Mapper.Map <FactDTO>)));
     };
 }
Exemplo n.º 2
0
        // /facts/query
        public IHttpActionResult ProcessQuery(FactDO query)
        {
            using (var uow = ObjectFactory.GetInstance <IUnitOfWork>())
            {
                //TODO: verify objectId owned by current user? i.e. requested container

                var facts = _fact.GetByObjectId(uow, query.ObjectId);
                return(Ok(facts.Select(Mapper.Map <FactDTO>)));
            };
        }