Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Entity Framework

  • 2 minutes to read
public class DoctorAppointment {
        [Key]
        public Int64 Id { get; set; }
        public bool AllDay { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public string PatientName { get; set; }
        public string Note { get; set; }
        public int PaymentStatusId { get; set; }
        public int IssueId { get; set; }
        public int EventType { get; set; }
        public string Location { get; set; }
        public string RecurrenceInfo { get; set; }
        public string ReminderInfo { get; set; }
        public Int64? DoctorId { get; set; }
    }
    public class Doctor {
        [Key]
        public Int64 Id { get; set; }
        public string Name { get; set; }
    }

    public class DoctorScheduleContext : DbContext {
        public DoctorScheduleContext()
            : base("name=DevExpress.XtraScheduler.Demos.Properties.Settings.DoctorConnectionString") {

        }
        public DbSet<DoctorAppointment> DoctorAppointments { get; set; }
        public DbSet<Doctor> Doctors { get; set; }
    }