我想要使用linq2db.EntityFrameworkCore对所有表进行通用查询
我有 5 件事。1. TableName 2. ColumnaName 3. ColumnValue 4. Where 条件列名 5. Where 条件列值。
到目前为止,我实际上正在尝试的是如下所示。
public void update(string entity, string attribute, object value, string whereAttribute, string whereAttributeValue)
{
projectContext.Set<object>().ToLinqToDBTable().TableName(entity)
.Where(t => t[whereAttribute] == whereAttributeValue) // This is not working.
.Set(t => t[attribute], value) // so far it is not giving any build error.
.Update();
}
但它不工作。如何解决这个问题?