Open lsczyzkb opened 6 years ago
The parameters of db.Database.ExecuteSqlCommandAsync(...) in method DefaultLolitaUpdateExecutor.ExecuteAsync(...) are in the wrong order,add a custom class implement ILolitaUpdateExecutor in your project and replace the default DefaultLolitaUpdateExecutor with it can resolve this issue.
Only one different place:
return db.Database.ExecuteSqlCommandAsync(sql, cancellationToken, param);
should be changed to
return db.Database.ExecuteSqlCommandAsync(sql, param, cancellationToken);
public Task BatchUpdateAsync<TProperty>(Expression<Func<TEntity, bool>> predicate, Expression<Func<TEntity, TProperty>> Property, object value) { return Context.Set<TEntity>().Where(predicate).SetField(Property).WithValue(value).UpdateAsync(); }
error No mapping to a relational type can be found for the CLR type 'CancellationToken'.