Beispiel #1
0
        public void RetrieveAllSubjects()
        {
            EAV.Store.Clients.ISubjectStoreClient client = factory.Create <EAV.Store.Clients.ISubjectStoreClient>();

            int nDbSubjects     = this.DbContext.Subjects.Count();
            int nClientSubjects = client.RetrieveSubjects(null, null).Count();

            Assert.AreEqual(nDbSubjects, nClientSubjects, "The number of subjects retrieved by the client does not match the number in the database.");
        }
Beispiel #2
0
 public IHttpActionResult RetrieveContextSubjects(int id)
 {
     try
     {
         return(Ok <IEnumerable <EAV.Store.IStoreSubject> >(subjectClient.RetrieveSubjects(id, EntityID)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }