-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It would be nice, if you could define your own mapping for the async-to-sync function conversion.
Example:
NHibernate.Linq.LinqExtensionMethods.ToListAsync=System.Linq.Enumerable.ToList
Currently, this source code generator tries to use NHibernate.Linq.LinqExtensionMethods.ToList, which doesn't exist and requires to write your own class, like:
namespace NHibernate.Linq;
internal static class LinqExtensionMethods
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static List<T> ToList<T>(IQueryable<T> query)
=> query.ToList();
}This, however, comes with its own problems:
- Complaints that the namespace doesn't match the directory structure/root namespace of the project
- Warning CS0436, because there is a static class in both the
NHibernateassembly and your own project
The mapping could be stored in a file included with AdditionalFiles, like the CsWin32 project does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels