コード例 #1
0
        public void RetrieveAllContainers()
        {
            EAV.Store.Clients.IContainerStoreClient client = factory.Create <EAV.Store.Clients.IContainerStoreClient>();

            int nDbContainers     = this.DbContext.Containers.Where(it => it.Parent_Container_ID == null).Count();
            int nClientContainers = client.RetrieveRootContainers(null).Count();

            Assert.AreEqual(nDbContainers, nClientContainers, "The number of containers retrieved by the client does not match the number in the database.");
        }
コード例 #2
0
 public IHttpActionResult RetrieveRootContainers(int id)
 {
     try
     {
         return(Ok <IEnumerable <EAV.Store.IStoreContainer> >(containerClient.RetrieveRootContainers(id)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }