private static CommentSmall projectCommentSmall(oxite_Comment comment, oxite_User user) { if (user.Username != "Anonymous") { return(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAuthenticated(comment, user))); } else { return(new CommentSmall(comment.CommentID, comment.CreatedDate, getUserAnonymous(comment, user))); } }
private Comment getComment(oxite_Comment comment, oxite_User user) { CommentSmall parent = comment.ParentCommentID != comment.CommentID ? getParentComment(comment.ParentCommentID) : null; Language language = new Language(comment.oxite_Language.LanguageID) { DisplayName = comment.oxite_Language.LanguageDisplayName, Name = comment.oxite_Language.LanguageName }; if (user.Username != "Anonymous") { return(new Comment(comment.Body, comment.CreatedDate, getUserAuthenticated(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, (EntityState)comment.State)); } else { return(new Comment(comment.Body, comment.CreatedDate, getUserAnonymous(comment, user), comment.CreatorIP, comment.UserAgent, comment.CommentID, language, comment.ModifiedDate, parent, (EntityState)comment.State)); } }
private static UserAnonymous getUserAnonymous(oxite_Comment comment, oxite_User user) { return(new UserAnonymous(comment.CreatorName, comment.CreatorEmail, comment.CreatorHashedEmail, comment.CreatorUrl)); }
private static User getUserAuthenticated(oxite_Comment comment, oxite_User user) { return(new User(user.UserID, user.Username, user.DisplayName, user.Email, user.HashedEmail, (EntityState)user.Status)); }
private void detach_oxite_Users(oxite_User entity) { this.SendPropertyChanging(); entity.oxite_Language = null; }
partial void Deleteoxite_User(oxite_User instance);
partial void Updateoxite_User(oxite_User instance);
partial void Insertoxite_User(oxite_User instance);