I have object:
public Either<Error, Provider> Provider { get; set; }
public class Provider
{
public string Name { get; set; }
public decimal? Amount { get; set; }
}
How do I get only the right value? I tried:
source.Provider.Map(x => x.Amount)
source.Provider.Select(x => x.Amount)
but when there's no value I get exception that the value is null, though I'd like it to be null so I could compare it later:
if (source.Provider.Select(x => x.Amount) != old.Price)
{
....
}