Chapter 3: User-Facing Backend -> Update with Lambda Expression


In the following code :

`await _sessionsCollection.UpdateOneAsync(u => u.UserId == user.Email,
Builders<Session>.Update.Set(u => u.UserId, user.Email).Set(s => s.Jwt, user.AuthToken),
new UpdateOptions { IsUpsert = true },

Is it possible to use lambda expression for the updateDefinition without using Builders ?

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.