Esempio n. 1
0
        public SavedPrescription Clone()
        {
            SavedPrescription newItem = new SavedPrescription();

            newItem._Id = this._Id;
            newItem._Title = this._Title;
            newItem.SavedPrescriptionDrugs = new System.Data.Objects.DataClasses.EntityCollection<SavedPrescriptionDrug>();

            for (int i = 0; i < this.SavedPrescriptionDrugs.Count; i++)
            {
                //newItem.SavedPrescriptionDrugs.Add(this.SavedPrescriptionDrugs.ElementAt(i).Clone());
            }

            //DataLayer.Detach(newItem);
            newItem.EntityKey = this.EntityKey;

            return newItem;
        }
Esempio n. 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SavedPrescriptions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSavedPrescriptions(SavedPrescription savedPrescription)
 {
     base.AddObject("SavedPrescriptions", savedPrescription);
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new SavedPrescription object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 public static SavedPrescription CreateSavedPrescription(global::System.Int32 id, global::System.String title)
 {
     SavedPrescription savedPrescription = new SavedPrescription();
     savedPrescription.Id = id;
     savedPrescription.Title = title;
     return savedPrescription;
 }