public void Delete(Department obj)
        {
            int count = 0;
            var q     = from a in DocDL.Read()
                        where (a.DepartmentId == obj.Id)
                        select new { a.Id };

            foreach (var item in q.ToList())
            {
                count++;
            }

            if (count > 0)
            {
                throw new Exception("این ساختمان خالی نیست و نمی‌توانید آن را حذف کنید");
            }
            else
            {
                DL.Delete(obj);
            }
        }
 public List <Doctor> Read()
 {
     return(DL.Read());
 }