コード例 #1
0
 public ActionResult Index2()
 {
     ViewBag.Rooms        = new SelectList(dbRoom.ToList(), "Id", "Name");
     ViewBag.Patients     = new SelectList(dbPatient.ToList(), "Id", "Name");
     ViewBag.ServiceTypes = new SelectList(dbServiceType.ToList(), "Id", "Name");
     ViewBag.Doctors      = new SelectList(dbDoctor.ToList(), "Id", "Name");
     return(View());
 }
コード例 #2
0
        public AllDoctorsResponse getAll()
        {
            try
            {
                var response = new AllDoctorsResponse();
                var bc       = new DoctorComponent();
                response.Result = bc.ToList();

                return(response);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };
                throw new HttpResponseException(httpError);
            }
        }
コード例 #3
0
        public ActionResult Index()
        {
            var doctors = db.ToList();

            return(View(doctors));
        }
コード例 #4
0
        public List <Doctor> ToList()
        {
            var especies = bs.ToList();

            return(especies);
        }