abp icon indicating copy to clipboard operation
abp copied to clipboard

Allow child classes of AbpCrudPageBase to control New Entity creation

Open jzumwalt opened this issue 3 years ago • 2 comments

Classes that inherit from AbpCrudPage base should be allowed to control instantiation of TCreateViewModel. This can allow for more control over initial state of new Entities, as well as enabling Copy EntityActions.

Basic implementation provided for explanation:

add a new method: protected virtual async Task<TCreateViewModel> NewCreateViewModelAsync() { return new TCreateViewModel(); }

Change all instances of new TCreateViewModel() to call NewCreateViewModel() instead: https://github.com/abpframework/abp/blob/c945df6d0dcc5a2191cca935ede8c979a983151e/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs#L331

jzumwalt avatar May 21 '22 19:05 jzumwalt

hi

You can contribute the code. : )

maliming avatar May 23 '22 02:05 maliming

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 30 '22 17:07 stale[bot]