I've started a new .net core 2 project and I'm trying to import a MySQL database to entity framework. I use this command to scaffold the DB:
Scaffold-DbContext "server=localhost;port=3306;user id=user;password=pass;database=MyDB;" "Pomelo.EntityFrameworkCore.MySql"
The process is successful, but I get this type of warning for each table that contains date columns:
Could not find type mapping for column 'my_table.DATE_ADDED' with data type 'date'. Skipping column.
This is the table:
ACCOUNT_ID int(10) UN PK
VIDEO_ID int(10) UN PK
DATE_ADDED date
The model being created is this:
public partial class MyTable
{
public int AccountId { get; set; }
public int VideoId { get; set; }
public Accounts Account { get; set; }
public Videos Video { get; set; }
}
My question is, is there any way to do the scaffolding process that will include date fields? if not, is there any way to fix the model so it can use the date data?