We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Please explain how i can use express mapper for this : this function response me a list of data with hierarchical form
var data = GetTree(repository, null);
List<DTO.Comments.Read> GetTree(List<Results.Comment_Result> list, int? parent) { return list.Where(x => x.ParentId == parent).Select(x => new DTO.Comments.Read { Id = x.Id, Author = x.Author, CommentType = x.CommentType, Content = x.Content, DislikeCount = x.DislikeCount, Email = x.Email, IPAddress = x.IPAddress, ParentId = x.ParentId, LikeCount = x.LikeCount, ProviderId = x.ProviderId, ProviderType = x.ProviderType, CreateDatetime = x.CreateDatetime, Items = GetTree(list, x.Id) }).ToList(); }
The text was updated successfully, but these errors were encountered:
Hi @msh13792,
You might find an article I wrote called Flattening Entity Framework relationships with ExpressMapper useful. Go to the section called Introducing ExpressMapper and I describe how you can handle hierarchical data using ExpressMapper.
Sorry, something went wrong.
No branches or pull requests
Hi
Please explain how i can use express mapper for this :
this function response me a list of data with hierarchical form
var data = GetTree(repository, null);
List<DTO.Comments.Read> GetTree(List<Results.Comment_Result> list, int? parent)
{
return list.Where(x => x.ParentId == parent).Select(x => new DTO.Comments.Read
{
Id = x.Id,
Author = x.Author,
CommentType = x.CommentType,
Content = x.Content,
DislikeCount = x.DislikeCount,
Email = x.Email,
IPAddress = x.IPAddress,
ParentId = x.ParentId,
LikeCount = x.LikeCount,
ProviderId = x.ProviderId,
ProviderType = x.ProviderType,
CreateDatetime = x.CreateDatetime,
Items = GetTree(list, x.Id)
}).ToList();
}
The text was updated successfully, but these errors were encountered: