You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to query data with where clause including ValueObject,please?
like this:
dbContext.Set().Where(o=>o.TotalAmount.Value >50000).ToList();
but it throw exception.
TotalAmount is the ValueObject of { Value, Currency}.
The text was updated successfully, but these errors were encountered:
effapp
changed the title
Custom Domain Entity throw Exception,why?please.
How to query data with where clause including ValueObject,please?
Mar 3, 2022
How to query data with where clause including ValueObject,please?
public class Customer
{
public int CustomerID { get; set; }
public string Name { get; set; }
public Boolean IsActive { get; set; }
public MoneyValueObject Balance { get; set; }
}
public class MoneyValueObject
{
public float Amount { get; set; }
public string Currency { get; set; }
}
var customers=dbContext.Set().Where(o=>o.Banlance.Amount >50000).ToList();
but it throw exception.
How to query data with where clause including ValueObject,please?
like this:
dbContext.Set().Where(o=>o.TotalAmount.Value >50000).ToList();
but it throw exception.
TotalAmount is the ValueObject of { Value, Currency}.
The text was updated successfully, but these errors were encountered: