예제 #1
0
        public void RetrieveAllAttributes()
        {
            EAV.Store.Clients.IAttributeStoreClient client = factory.Create <EAV.Store.Clients.IAttributeStoreClient>();

            int nDbAttributes     = this.DbContext.Attributes.Count();
            int nClientAttributes = client.RetrieveAttributes(null).Count();

            Assert.AreEqual(nDbAttributes, nClientAttributes, "The number of attributes retrieved by the client does not match the number in the database.");
        }
예제 #2
0
 public IHttpActionResult RetrieveAttributes(int id)
 {
     try
     {
         return(Ok <IEnumerable <EAV.Store.IStoreAttribute> >(attributeClient.RetrieveAttributes(id)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }