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
public class Order : Entity<OrderId>, IAggregateRoot
{
/// <summary>
///
/// </summary>
protected Order()
{
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="count"></param>
public Order(string name, int count)
{
this.Name = name;
this.Count = count;
this.CreateTime = DateTime.UtcNow;
this.OrderItems.Add(new OrderItem(name, count));
this.RowVersion = new RowVersion(0);
this.AddDomainEvent(new OrderCreatedDomainEvent(this));
}
public RowVersion RowVersion { get; private set; } = new RowVersion(0);
}
Error:
Property set method not found.\n ---> System.ArgumentException: Property set method not found.\n at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)\n at NetCorePal.Extensions.Repository.EntityFrameworkCore.AppDbContextBase.UpdateRowVersionBeforeSaveChanges(ChangeTracker changeTracker) in /Users/xiao/code/netcorepal-cloud-framework/src/Repository.EntityFrameworkCore/AppDbContextBase.cs:line 157\
The text was updated successfully, but these errors were encountered:
entity
Error:
Property set method not found.\n ---> System.ArgumentException: Property set method not found.\n at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)\n at NetCorePal.Extensions.Repository.EntityFrameworkCore.AppDbContextBase.UpdateRowVersionBeforeSaveChanges(ChangeTracker changeTracker) in /Users/xiao/code/netcorepal-cloud-framework/src/Repository.EntityFrameworkCore/AppDbContextBase.cs:line 157\
The text was updated successfully, but these errors were encountered: