EF Core to Mysql table binding

前端 未结 1 1201
感情败类
感情败类 2020-12-12 03:34

I have the following table in MySQL

When I run the following code in some middleware

var apiKeys = _appContext.apikey.ToList();

I

相关标签:
1条回答
  • 2020-12-12 04:03

    2 possible options as answered in comments already.

    • Pomelo driver supports bool to int mapping,
    • Second option would be using value converters, which works with the other driver.

      entity.Property(p => p.isActive).HasConversion< int >();

    0 讨论(0)
提交回复
热议问题