Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Not able to bind data from Umbraco BlockList data by my API method
This is my code
public async Task<EmployeeDetailsLayout.EmployeeDetails> GetCompanyEmployeesLayoutpage(GenericContentPage genericContentPage) { try { EmployeeDetailsLayout.EmployeeDetails listEmployeeLayout = new EmployeeDetailsLayout.EmployeeDetails(); if (_umbracoHelperAccessor.TryGetUmbracoHelper(out var umbracoHelper) is false) { throw new Exception("Unable to get Umbraco Helper"); } var _node1 = umbracoHelper.Content(1257); // var contentPage = GetGenericContentPage("companyemployees"); if (_node1 is not null) { var result = _node1.Value<dynamic>("Employees"); // genericContentPage.BlockList.Select(x => x.GetCorrespondingElementModel()).ToList(); foreach (var item in result) { listEmployeeLayout.blockItems.Add(new EmployeeDetailsLayout.BlockItems { EmployeeName = item.Content.EmployeeName, EmployeeEmail = item.Content.EmployeeEmail, EmployeePosition = item.Content.EmployeePosition, EmployeePhone = item.Content.EmployeePhone, EmployeeImage= item.Content }) ; } } // listEmployeeLayout = _mapper.Map<EmployeeDetailsLayout.EmployeeDetails>(listEmployeeLayout); return listEmployeeLayout; } catch (Exception ex) { throw ex; } }
What is the exact error you are receiving?
I got the solution. Thank You.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Not able to bind data from Umbraco BlockList data by my API method
Not able to bind data from Umbraco BlockList data by my API method
This is my code
What is the exact error you are receiving?
I got the solution. Thank You.
is working on a reply...