Closed Snotax closed 2 years ago
I have another problem with my LINQ queries. I'm not sure what it is, probably a missuse on my side.
Can somebody explain to me how to update only certain values on a document ?
var result = await _dbContext.QueryLinq<Tenant>("gt", "env").Where(t => t.Key == key).Update(x => new { Name = x.Name, ShortForm = x.ShortForm, Disabled = x.Disabled, PrimaryColor = primaryColor, SecondaryColor = secondaryColor, BaseUrl = baseUrl, AvailableRegions = availableRegions.ToList(), AvailableFeatures = availableFeatures.ToList(), Logo = logo.Length > 0 ? logo : x.Logo, Key = key }, x => x.Key).ToListAsync();
As soon as I try to access "x", I get a NULLPOINTER exception, and when I dont set those values, they will all get overwritten with NULL.
Thanks in advance!
I have another problem with my LINQ queries. I'm not sure what it is, probably a missuse on my side.
Can somebody explain to me how to update only certain values on a document ?
As soon as I try to access "x", I get a NULLPOINTER exception, and when I dont set those values, they will all get overwritten with NULL.
Thanks in advance!