Repository navigation
feat(cli): implement gen-crud command - #17
Merged
Merged
Conversation
…prompts for gen crud
- Fix list_presentation_layers to recognize {{ Name }} placeholder
in workflow destination paths (blocked add persistence/mediator)
- Fix positional arg ID mismatch: registration used 'entity-name'
but handler accessed 'name' (gen crud never received entity name)
- Fix check_entity_exists to use correct service path with
.Core.Domain and feature-based layout support
- Fix error propagation: handle() silently swallowed errors via
let _res pattern; now uses ? operator
- Fix handle() to use command.context instead of re-creating
ServiceInfo with hardcoded generator ID
- Wire FileSystemEntitySchemaStore into DI for schema loading
general_type().to_string() emitted schema-level names (uuid, integer) instead of C# types (Guid, long) into generator template parameters. Now uses to_csharp_type() in both entity and CRUD command handlers.
Integer mapped to both int and long CLI types, always emitting long. Now int → Integer (C# int, Rust i32), long → BigInteger (C# long, Rust i64).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Motivation and Context
Implement the
gen-crudcommand for the nfw CLI, enabling automatic generation of complete CRUD scaffolding (commands, queries, handlers, repository) for NFramework services. This is a core productivity feature that eliminates boilerplate and enforces architectural consistency across all services.⚙️ Implementation Details
CLI Layer (Phase 2):
string,int,long,decimal,double,float,bool,datetime,datetimeoffset,guid,byte[],short), required field enforcementSchema & Type Mapping:
BigIntegervariant toGeneralTypeenum (long/ C#long/ Rusti64) alongside existingInteger(int)to_csharp_type()is now called for C# template context (was using schema-levelto_string()which emitted raw names likeuuidinstead ofGuid)add_entity,gen_crud) to use the correct type contextBug Fixes (discovered during end-to-end smoke test):
Domain.Features.{Feature}.Entities(was flatDomain.Entities)CreateCommand.ToEntity()now passesGuid.NewGuid()as first constructor argumentout T?+ null-forgiving operator in all command/query handlers📋 Checklist for Reviewer
make format✅ — markdown, Rust (clippy + fmt), shell all cleanmake lint✅ — all crates pass clippy🔗 Related
feat/railway-rail-pipeline)feat/add-crud-support-dotnet)