I want a generic query for all the tables using linq2db.EntityFrameworkCore
I have 5 things. 1. TableName 2. ColumnaName 3. ColumnValue 4. Where condition column name 5. Where condition column value.
So far what I am trying practically is something like below.
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();
}
but it is not working. how to fix this?