abpframework / abp

Open Source Web Application Framework for ASP.NET Core. Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.27k stars 3.32k forks source link

IdentityUser adds navigation properties #19586

Open 1957993455 opened 2 weeks ago

1957993455 commented 2 weeks ago

Is there an existing issue for this?

Description

现在我想在IdentityUser中添加一个集合public ICollection<Post> Posts { get; set; } ,但是好像不能继承IdentityUser这个类,所有我用abp框架的对象拓展功能来实现一个用户对应多个post的关系,我不知道如何实现,我搜索了,但是好像都不太正确,或者说文章和用户不用配置这个关系,能给我一个解决方案吗?我不太了解这个框架

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

8.1

User Interface

MVC

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

现在我想在IdentityUser中添加一个集合public ICollection<Post> Posts { get; set; } ,但是好像不能继承IdentityUser这个类,所有我用abp框架的对象拓展功能来实现一个用户对应多个post的关系,我不知道如何实现,我搜索了,但是好像都不太正确,或者说文章和用户不用配置这个关系,能给我一个解决方案吗?我不太了解这个框架

realLiangshiwei commented 2 weeks ago

This is not a bug, and you can configure one to many relationships between Posts and IdentityUser entities https://learn.microsoft.com/en-us/ef/core/modeling/relationships/one-to-many