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; }
/// <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; }
/// <summary> /// Deprecated Method for adding a new object to the Drugs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDrugs(Drug drug) { base.AddObject("Drugs", drug); }