Closed enfJoao closed 1 month ago
This can't work. What should x
be?
The correct setup would have a class like BlogPost
in the AppCode.Data
.
Then your file B would look like this:
@inherits Custom.Hybrid.RazorTyped
@using AppCode
@using AppCode.Data
@{
var tB= App.Data.GetAll<BlogPost>();
}
Sorry. When copying the code from my template I abbreviated too much. "x" is my datatype, so BlogPost for example.
Everything else is still valid. The class exists:
Updated the original example.
To clarify:
Template A:
@inherits Custom.Hybrid.RazorTyped
@using AppCode
@using AppCode.Data
@Html.Partial("shared/_B.cshtml", new { Units = true, Years = true, Months = true })
Template B:
@inherits Custom.Hybrid.RazorTyped
@using AppCode
@using AppCode.Data
@{
var tUnits = App.Data.GetAll<zDepartments>()
}
Results in CS0234: The type or namespace name 'Data' does not exist in the namespace 'AppCode'
Ok. I know you're coming from DNN - but above you wrote Oqtane.
We might have a bug in the AppCode in Oqtane, which @tvatavuk is looking into.
Can you confirm that ATM you're working in Oqtane?
Yes. I picked a DNN app and I'm trying to make it work in Oqtane. The current issue is in Oqtane.
Thank you for reporting this issue! We identified that inconsistent path formatting was causing the problem, which has now been addressed by ensuring uniform path formatting for reliable comparisons. This fix will be included in the next release.
I'm submitting a
[x] bug report [x] not sure
...about
[x] Razor templating [x] other / unknown
Current Behavior / Expected Behavior
This is a working code from a DNN app
Template A:
Template B:
Results in CS0246: The type or namespace name 'zDepartments' could not be found
Adding
to Template B results in CS0234: The type or namespace name 'Data' does not exist in the namespace 'AppCode'
Your environment