// Default contructor that set entity to field public WikiModel(Wiki wiki) { this._wiki = wiki; this._id = wiki.Id; this._subject = wiki.Subject; this._body = wiki.Body; this._type = wiki.Type; this._created_by = wiki.CreatedBy; this._modified_by = wiki.ModifiedBy; this._created_date = wiki.CreatedDate; this._modified_date = wiki.ModifiedDate; this._originalWiki = wiki.DeepClone(); }
// Delete a existed Wiki public void DeleteWiki(Wiki _wiki) { unitOfWork.Delete<Wiki>(_wiki); }
// Add a new Wiki public Wiki AddWiki(Wiki _wiki) { unitOfWork.Add<Wiki>(_wiki); return _wiki; }
// Update a existed Wiki public Wiki UpdateWiki(Wiki _wiki) { unitOfWork.Update<Wiki>(_wiki); return _wiki; }
// Refresh an existed Wiki public Wiki RefeshWiki(Wiki _wiki) { unitOfWork.Refresh<Wiki>(_wiki); return _wiki; }
/// <summary> /// Deprecated Method for adding a new object to the Wiki EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToWiki(Wiki wiki) { base.AddObject("Wiki", wiki); }
/// <summary> /// Create a new Wiki object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="createdBy">Initial value of the CreatedBy property.</param> /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param> public static Wiki CreateWiki(global::System.Guid id, global::System.Guid createdBy, global::System.Guid modifiedBy) { Wiki wiki = new Wiki(); wiki.Id = id; wiki.CreatedBy = createdBy; wiki.ModifiedBy = modifiedBy; return wiki; }
// Default contructor public WikiModel() { this.IsNewItem = true; this._wiki = new Wiki(); }