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."); }
public IHttpActionResult RetrieveRootContainers(int id) { try { return(Ok <IEnumerable <EAV.Store.IStoreContainer> >(containerClient.RetrieveRootContainers(id))); } catch (Exception ex) { return(InternalServerError(ex)); } }