/// <summary> /// Update into XMPost /// </summary> /// <param name="xmpost">XMPost</param> public void UpdateXMPost(XMPost xmpost) { if (xmpost == null) { return; } if (this._context.IsAttached(xmpost)) { this._context.XMPosts.Attach(xmpost); } this._context.SaveChanges(); }
/// <summary> /// Insert into XMPost /// </summary> /// <param name="xmpost">XMPost</param> public void InsertXMPost(XMPost xmpost) { if (xmpost == null) { return; } if (!this._context.IsAttached(xmpost)) { this._context.XMPosts.AddObject(xmpost); } this._context.SaveChanges(); }