コード例 #1
0
        public BlogSearchResult(string Keyword, Blogs Blog, UserNoPass Owner)
            : base(Keyword, "BlogResult")
        {
            this.Id        = Blog.Id;
            this.Title     = Blog.Title;
            this.OwnerId   = Owner.Id;
            this.OwnerName = Owner.Username;

            ObjectInfo = System.Text.Json.JsonSerializer
                         .Serialize(new { BlogId = Id, Title = Title, OwnerId = OwnerId, OwnerName = OwnerName });
        }
コード例 #2
0
        public UserSearchResult(string Keyword, UserNoPass User, IEnumerable <Blogs> Blogs)
            : base(Keyword, "UserResult")
        {
            this.Username = User.Username;
            this.Email    = User.Email;
            this.Id       = User.Id;
            this.Blogs    = Blogs.Select(b => b.Title);

            ObjectInfo = System.Text.Json.JsonSerializer
                         .Serialize(new { UserId = Id, Username = Username, Email = Email, Blogs = this.Blogs });
        }
コード例 #3
0
ファイル: MainFriendVm.cs プロジェクト: BogTodES/BlogAppV1
 public MainFriendVm(UserNoPass Friend)
 {
     this.FriendId       = Friend.Id;
     this.FriendUsername = Friend.Username;
     this.FriendPhoto    = Friend.PhotoId;
 }