/// <summary> /// 发布 /// </summary> public virtual void Publish() { var data = Origin.DeserializeJson <AreaEntity>(); if (data == null) { return; } Id = data.Id; Name = data.Name; City = data.City; Type = data.Type; Color = data.Color; Tag = data.Tag; Path = data.Path; Value = data.Value; IsUsed = data.IsUsed; SaveType = data.SaveType; if (SaveType != SaveType.Remove) { SaveType = SaveType.Modify; SetProperty(it => it.Path) .SetProperty(it => it.Tag) .SetProperty(it => it.Color) .SetProperty(it => it.Value) .SetProperty(it => it.IsUsed); } }
/// <summary> /// 得到原始 /// </summary> /// <returns></returns> public virtual AreaEntity GetOrigin() { return(Origin.DeserializeJson <AreaEntity>()); }