I'm currently migrating a project from ASP.NET MVC to ASP.NET MVC Core.
In the server code I'm using a DataTable from the database which is converted to a DataSourceResult with ToDataSourceResult.
It worked fine in the ASP.NET MVC version, but the same code in the ASP.NET MVC Core version throws an exception when using aggregate functions.
System.InvalidOperationException: 'No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. '