I'm wondering if you could add a new feature to abp Suite to generate shared classes with two files such as this:
BookDto.cs <- Developer can modify this to their specialized needs BookDto.generated.cs <- Generated class by abp Suite - Developer does not modify this
This way, we can continue to regenerate these entities without overwriting any custom work that we may do.
Thank you!
-B
7 Answer(s)
-
0
I would go further and do it with services and controllers also!
I´m always adding something custom and its a pain to update. Nb. I´m not still gone live so I can iterate fast but would love to do it even faster!
-
0
creating a "generated.cs" file is a partial solution of not overwriting your custom code, what about injecting code in existing classes (DbContext, Permissions, MenuProviders etc..) ?
-
0
I would go further and do it with services and controllers also!
I´m always adding something custom and its a pain to update.
Nb. I´m not still gone live so I can iterate fast but would love to do it even faster!can you give details and concrete examples about your solution
-
0
can you give details and concrete examples about your solution
My services/controllers have more functions than just related to talking to the database so I have stuff like
public interface ICarsAppService : IApplicationService { Task<CarsDto> GetAsync(Guid id); // ...etc. CRUD stuff from Suite //And then I have custom stuff like this that is not db/crud related Task UploadCarImageBlobAsync(string blobName); // ...etc // all of this gets removed and I need to add it again... }
But then I also have changes in the CRUD methods e.g. swapping out their content and calling a Manager.
And then Suite also removes all the extra private readonly members (and from the constructors) so I need to add it all back in.
Now I try to add all my changes to code at the bottom so its easier to update with suite. I just copy/paste the removed code back in!
Why not just keep what is not ABP Crud? Why delete it all?
And since we are at it... can we have Suite also have the possibility to have a this. option instead of having all members starting with _ ?
-
0
And one more thing... can you please not remove the comments I put on my properties? That would be awesome ;-)
-
0
creating a "generated.cs" file is a partial solution of not overwriting your custom code, what about injecting code in existing classes (DbContext, Permissions, MenuProviders etc..) ?
Could some of this be alleviated by creating base classes?
-
0
Maybe generate partial class could be option