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 }); }
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 }); }
public MainFriendVm(UserNoPass Friend) { this.FriendId = Friend.Id; this.FriendUsername = Friend.Username; this.FriendPhoto = Friend.PhotoId; }