private static void CreateAmusingVisitDetail(Visit visit) { var detail = VisitDetail.CreateVisitDetail(0, Generate.RandomSymptoms(), Generate.RandomDiagnosis(), Generate.RandomTreatment()); visit.VisitDetail = detail; context.SaveChanges(); }
/// <summary> /// Create a new Visit object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="doctorId">Initial value of the DoctorId property.</param> /// <param name="patientId">Initial value of the PatientId property.</param> /// <param name="dateOfVisit">Initial value of the DateOfVisit property.</param> public static Visit CreateVisit(global::System.Int32 id, global::System.Int32 doctorId, global::System.Int32 patientId, global::System.DateTime dateOfVisit) { Visit visit = new Visit(); visit.Id = id; visit.DoctorId = doctorId; visit.PatientId = patientId; visit.DateOfVisit = dateOfVisit; return visit; }
/// <summary> /// Deprecated Method for adding a new object to the Visits EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToVisits(Visit visit) { base.AddObject("Visits", visit); }