/// <summary> /// Move the category to other parent category. /// </summary> /// <param name="parentID">The parent category id.</param> /// <remarks> /// Set the parentID to move the category to top level. /// </remarks> public void MoveTo(int parentID) { parent = null; Model.ParentID = parentID; this.ParentID = parentID; DataContext.Update(Model); DataContext.SaveChanges(); }
/// <summary> /// Move the category to other parent category. /// </summary> /// <param name="parentID">The parent category id.</param> /// <remarks> /// Set the parentID to move the category to top level. /// </remarks> public void MoveTo(int parentID) { parent = null; Model.ParentID = parentID; this.ParentID = parentID; DataContext.Update(Model); DataContext.SaveChanges(); }