Пример #1
0
        public Drug Clone()
        {
            Drug newItem = new Drug();

            newItem._Id = this._Id;
            newItem._Manual = this._Manual;
            newItem._Title = this._Title;

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

            return newItem;
        }
Пример #2
0
 /// <summary>
 /// Create a new Drug object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 public static Drug CreateDrug(global::System.Int32 id, global::System.String title)
 {
     Drug drug = new Drug();
     drug.Id = id;
     drug.Title = title;
     return drug;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Drugs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDrugs(Drug drug)
 {
     base.AddObject("Drugs", drug);
 }