- ABP Framework version: v4.3.1
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:
Hi,
I created navigation property by abp suite. It created additional entity named: xxxWithNavigationProperties
I have some confusion about it. Why use this way for navigation property? Why not use as commercial examples: easy-crm
public class Order : FullAuditedAggregateRoot<Guid>, IMultiTenant
{
public virtual ICollection<OrderLine> OrderLines { get; set; }
}
public class OrderLine : FullAuditedEntity<Guid>, IMultiTenant
{
public virtual Product Product { get; set; }
}
Could you please give me some hint or idea? Where I could get the introduction or information about it? As I see the source code related to navigation property, all use as easy-crm way.
Thx
8 Answer(s)
-
0
Any ideas? Need Help.
Thx
-
0
ICollection<OrderLine> OrderLines Product Product { get; set; }
these are not navigation properties
-
0
Sorry is not Product. It is Order. Here is the whole class.
public class OrderLine : FullAuditedEntity<Guid>, IMultiTenant { public const string DefaultSorting = "product.name asc"; public virtual Guid? TenantId { get; set; } public virtual Guid OrderId { get; set; } public virtual Guid ProductId { get; set; } public virtual uint Count { get; set; } public virtual float StandardPrice { get; set; } public virtual float ActualPrice { get; set; } public virtual Order Order { get; set; } public virtual Product Product { get; set; } protected OrderLine() { } public OrderLine(Guid id) { Id = id; } public OrderLine(Guid id, Guid orderId, Guid productId, uint count, float standardPrice, float actualPrice, Guid? tenantId = null) : base(id) { TenantId = tenantId; OrderId = orderId; ProductId = productId; Count = count; StandardPrice = standardPrice; ActualPrice = actualPrice; } }
-
0
public class Order : FullAuditedAggregateRoot<Guid>, IMultiTenant { public virtual ICollection<OrderLine> OrderLines { get; set; } }
public class OrderLine : FullAuditedEntity<Guid>, IMultiTenant { public virtual Order Order { get; set; } }
-
0
Here is the ABP Suite create addition class:
public class BackCategoryWithNavigationProperties { public BackCategory BackCategory { get; set; } public BackCategoryBrother BackCategoryBrother { get; set; } }
I have some confusion about it. Why create another class for the navigation relationship.
Why Example easy-crm use property for the navigation relationship.
Do you get my question? thx
-
0
ICollection<OrderLine> OrderLines Product Product { get; set; }
these are not navigation properties
Sorry is not Product. It is Order. Here is the whole class.
public class Order : FullAuditedAggregateRoot<Guid>, IMultiTenant { public virtual ICollection<OrderLine> OrderLines { get; set; } }
public class OrderLine : FullAuditedEntity<Guid>, IMultiTenant { public virtual Order Order { get; set; } }
-
0
because making property navigation is not best practise for a module. suite is designed to support both modules and app templates. but easy crm is not a module. if you are not working on a module template, you can change the final output of Suite to support
ICollection<OtherEntity> OtherEntities
-
0
Thank you for your explanation. I will close this.