This is probably simple, but I can't figure out how to set multiple properties in a single statement.
LCCorsOptions.cs:
public class LCCorsOptions
{
public int AppId { get; set; }
public string Version { get; set; } = "1.0";
}
This is what I got so far:
app.UseLCCors(o => o.Version = "1.0");
I've tried multiple approaches, but with no luck
This is about lambda syntax, the part on the right is a normal method body that you may shorten when it is 1 expression or 1 statement. Otherwise, use full { }and ;
app.UseLCCors(o => {o.Version = "1.0"; o.AppId = 2; });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With