I have tried the following code on Visual Studio Code with OmniSharp extension has been installed. I installed .Net core 2.1.3.
List<MyType> listName = dataTableName.AsEnumerable().Select(m => new MyType()
{
ID = m.Field<string>("ID"),
Description = m.Field<string>("Description"),
Balance = m.Field<double>("Balance"),
}).ToList()
But it seem not to be able use AsEnumerable(). And the message "Cannot convert lambda expression to type 'string' because it is not a delegate type" was showed. These are my using:
using System.Linq;
using System.Data;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using RestfulAPI.Commons;
using RestfulAPI.Models.DBModels;
How can I use LinQ on .Net Core? LinQ seem to be supported by .Net Framework. But I want my webservices API can run on Linux server. Have risk if use your solution, I cannot run my webservices on Linux server?