public UserRecord UpdateRecord(UserRecord record) { record.Name = UserName; record.Account.Account = AccountName; if (!string.IsNullOrEmpty(Password)) record.Account.SetPassword(Password); return record; }
public static PostRecord Create(UserRecord user) { return new PostRecord { AllowComment = true, Categorys = new List<PostCategoryRecord>(), Comments = new List<PostCommentRecord>(), CreateTime = DateTime.Now, Id = Guid.NewGuid().ToString("N"), ShowInIndex = true, User = user, Seo = new SeoModel() }; }