Closed Fosol closed 1 year ago
Describe the bug When I attempt to compile and render a string template it throws an error.
TNO.Services.Notification.NotificationManager: Error: Failed to handle message
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Collections.Generic.List' does not contain a definition for 'FirstOrDefault'
To Reproduce Create a template that includes a Linq statement and a FirstOrDefault() extension method call.
FirstOrDefault()
Expected behavior I would expect as long as I have the @using System.Linq; statement in the template it should work correctly.
Information (please complete the following information):
To resolve this it requires setting the @model or providing the engine additional type information so that it can use extension methods.
@model
Describe the bug When I attempt to compile and render a string template it throws an error.
TNO.Services.Notification.NotificationManager: Error: Failed to handle message
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Collections.Generic.List' does not contain a definition for 'FirstOrDefault'
To Reproduce Create a template that includes a Linq statement and a
FirstOrDefault()
extension method call.Expected behavior I would expect as long as I have the @using System.Linq; statement in the template it should work correctly.
Information (please complete the following information):