Lambda表达式,用于显示表状态

时间:2018-12-04 07:24:34

标签: entity-framework linq lambda

我正在使用ASP.NET Core和Entity Framework Core。如何将这个查询编写为lambda表达式或linq?

INFO - 2018-11-20T14:44:03.452131
INFO - Traceback (most recent call last):
INFO - File "/home/ubuntu/script.py", line 84, in <module>
INFO - start_timestamp_no_iso = datetime.strptime(start_timestamp, "%Y-%m-%dT%H:%M:%S.%f")
INFO - File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
INFO - tt, fraction = _strptime(data_string, format)
INFO - File "/usr/lib/python3.6/_strptime.py", line 365, in _strptime
INFO - data_string[found.end():])
INFO - ValueError: unconverted data remains:
INFO - Command exited with return code 1

1 个答案:

答案 0 :(得分:0)

您不能。您执行该命令的唯一选择是编写:

_context.Database.SqlQuery<Status>("show table status WHERE NAME = 'crm_Pipeline'");

并且您需要声明覆盖结果的状态类。