-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source Code Generator #431
Comments
Initially snippets could be created https://docs.microsoft.com/en-us/visualstudio/ide/code-snippets?view=vs-2022 |
@frankyjquintero snippets is nice for many requirement roslyn-sdk this guy is reflecting whenever your model changed as you can see in samples as easy as preparing snipped and in some senarios compile time is faster then written code |
I'm so looking forward to that one as I'm pissed writing repeating code over and over again :) |
Hi, as an temporary alternative we can use this : #598 |
I Followed the suggestions of Mukesh Should be under src/Utils/SourceGenerator The code is based on the product and brand entities with the new directories in place (and if not completely integrated in fullstackhero) in program.cs approach : How it works. If you restart the program The code will get the entityTypes from EF-Core for the validators a validation as in createproductsrequestvalidator is made but commented out so the appropriate fieldname(s) can be copied in and code eventually adapted. If any alterations are made to an entity and a new migration is run, delete the appropriate entity folder in FSH.WebApi.Application.Catalog. <&Entity&> : the entity |
Code is in my github Repository Name : FSH.WebApi |
Working on some bugs my repository generates some errors in the end result... Sorry |
It looks like a very good start, probbably create a PR, to get more opinions, but nice work |
Thx wIll do so asap. But first I'm still working on the validator stuff (getting close). |
iammukeshm and @Stonne |
It will be nice to have a feature to generate code and further reduce the time taken by a developer.
The scope -
DomainEntities and related configurations
Service Layers
Validators
Generic Specification
Mediatr handlers / Dtos
Controller
All these files should be generated on the basis of a new entity.
Should be under src/Utils/SourceGenerator
with assembly name as FSH.WebApi.SourceGenerator
The text was updated successfully, but these errors were encountered: