Ejemplo n.º 1
0
        public VisitCategory FindOne(int?id)
        {
            VisitCategory visitCategory = null;

            if (id != null)
            {
                using (ITransaction transaction = Session.BeginTransaction())
                {
                    Repository    = new VisitCategoryRepository(Session);
                    visitCategory = Repository.FindOne <VisitCategory>((int)id);
                    transaction.Commit();
                }
            }
            return(visitCategory);
        }
Ejemplo n.º 2
0
 public List <Visit> FindAllByPatientAndRange(Patient patient, DateTime left, DateTime right, VisitCategory visitCategory)
 {
     return(FindAll()
            .Where(visit => visit.Patient.Id.Equals(patient.Id))
            .Where(visit => visit.Date >= left && visit.Date <= right)
            .Where(visit => visit.VisitCategory.Id.Equals(visitCategory.Id))
            .ToList());
 }