Example #1
0
 public List <Doctor> GetDeletedDoctor()
 {
     using (RepositoryDoctor repositoryDoctor = new RepositoryDoctor())
     {
         return(repositoryDoctor.WhereWithExplicitLoad(I => I.IsActive == false).ToList());
     }
 }
Example #2
0
 public List <Doctor> GetActiveDoctors()
 {
     using (RepositoryDoctor repositoryDoctor = new RepositoryDoctor())
     {
         List <Doctor> doctors = repositoryDoctor.WhereWithExplicitLoad(I => I.IsActive == true, paths: new string[] { "Hospital" }).ToList();
         foreach (var item in doctors)
         {
             item.Age = (DateTime.Now.Year - item.Birthday.Year);
         }
         return(doctors);
     }
 }