How does Update work?! C# SDK

Using: C# SDK.. I am trying to understand or find a way, but can´t find any docs on it. If I am doing this:
c#
await _supabase
.From<UserUpdateDTO>()
.Where(u => u.Id == userID)
.Update(user);
c#
await _supabase
.From<UserUpdateDTO>()
.Where(u => u.Id == userID)
.Update(user);
user can have keys that are null. Will supabase update the cells that is allowed to have nulls or will it be ignored? Can I send in a partial object and only update the data that comes in the object? How does it work, the docs is limited. This is my model:
C#
public class UserUpdateDTO : BaseModel
{

[PrimaryKey("id")]
public string Id { get; set; }

[Column("name")]
public string? Name { get; set; }

[Column("email")]
public string? Email { get; set; }

[Column("tier")]
public string? Tier { get; set; }

[Column("provider")]
public string? Provider { get; set; }

[Column("provider_id")]
public string? ProviderID { get; set; }

[Column("stripe_customer_id")]
public string? StripeCustomerId { get; set; }

[Column("stripe_subscription_id")]
public string? StripeSubscriptionId { get; set; }

[Column("subscription_status")]
public string? SubscriptionStatus { get; set; }

[Column("current_period_end")]
public DateTime? CurrentPeriodEnd { get; set; }
}
C#
public class UserUpdateDTO : BaseModel
{

[PrimaryKey("id")]
public string Id { get; set; }

[Column("name")]
public string? Name { get; set; }

[Column("email")]
public string? Email { get; set; }

[Column("tier")]
public string? Tier { get; set; }

[Column("provider")]
public string? Provider { get; set; }

[Column("provider_id")]
public string? ProviderID { get; set; }

[Column("stripe_customer_id")]
public string? StripeCustomerId { get; set; }

[Column("stripe_subscription_id")]
public string? StripeSubscriptionId { get; set; }

[Column("subscription_status")]
public string? SubscriptionStatus { get; set; }

[Column("current_period_end")]
public DateTime? CurrentPeriodEnd { get; set; }
}
1 Reply
silentworks
silentworks2h ago
Unless someone comes along who uses the C# library you probably won't get an answer anytime soon. We don't have many people on here who are using C#. Also note the C# SDK is community maintained so it could be outdated or missing features at times, it might be good to check the Github account too.

Did you find this page helpful?